Skip to content
Permalink
Browse files
Web Inspector: Debugger statement gets a space after it when pretty p…
…rinted

https://bugs.webkit.org/show_bug.cgi?id=156867
<rdar://problem/25862308>

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2016-04-21
Reviewed by Geoffrey Garen.

Source/WebInspectorUI:

* Tools/Formatting/index.html:
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
Handle the unhandled DebuggerStatement node type.

LayoutTests:

* inspector/formatting/formatting-javascript-expected.txt:
* inspector/formatting/formatting-javascript.html:
* inspector/formatting/resources/javascript-tests/other-statements-expected.js: Renamed from LayoutTests/inspector/formatting/resources/javascript-tests/throw-statement-expected.js.
* inspector/formatting/resources/javascript-tests/other-statements.js: Renamed from LayoutTests/inspector/formatting/resources/javascript-tests/throw-statement.js.

Canonical link: https://commits.webkit.org/174973@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@199838 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JosephPecoraro authored and webkit-commit-queue committed Apr 21, 2016
1 parent e8d0d06 commit 48194afd3a2313b5fb12084e4d278cbc4665a83c
@@ -1,3 +1,16 @@
2016-04-21 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Debugger statement gets a space after it when pretty printed
https://bugs.webkit.org/show_bug.cgi?id=156867
<rdar://problem/25862308>

Reviewed by Geoffrey Garen.

* inspector/formatting/formatting-javascript-expected.txt:
* inspector/formatting/formatting-javascript.html:
* inspector/formatting/resources/javascript-tests/other-statements-expected.js: Renamed from LayoutTests/inspector/formatting/resources/javascript-tests/throw-statement-expected.js.
* inspector/formatting/resources/javascript-tests/other-statements.js: Renamed from LayoutTests/inspector/formatting/resources/javascript-tests/throw-statement.js.

2016-04-21 Brady Eidson <beidson@apple.com>

Modern IDB (Workers): More IDBConnectionProxy refactoring.
@@ -41,6 +41,9 @@ PASS
-- Running test case: EsprimaFormatter.JavaScript.object-array-literal.js
PASS

-- Running test case: EsprimaFormatter.JavaScript.other-statements.js
PASS

-- Running test case: EsprimaFormatter.JavaScript.return-statement.js
PASS

@@ -62,9 +65,6 @@ PASS
-- Running test case: EsprimaFormatter.JavaScript.ternary-expressions.js
PASS

-- Running test case: EsprimaFormatter.JavaScript.throw-statement.js
PASS

-- Running test case: EsprimaFormatter.JavaScript.try-catch-finally-statements.js
PASS

@@ -22,14 +22,14 @@
"resources/javascript-tests/logic-expressions.js",
"resources/javascript-tests/new-expression.js",
"resources/javascript-tests/object-array-literal.js",
"resources/javascript-tests/other-statements.js",
"resources/javascript-tests/return-statement.js",
"resources/javascript-tests/sample-jquery.js",
"resources/javascript-tests/sample-normal-utilities.js",
"resources/javascript-tests/sample-webinspector-object.js",
"resources/javascript-tests/switch-case-default.js",
"resources/javascript-tests/template-strings.js",
"resources/javascript-tests/ternary-expressions.js",
"resources/javascript-tests/throw-statement.js",
"resources/javascript-tests/try-catch-finally-statements.js",
"resources/javascript-tests/unary-binary-expressions.js",
"resources/javascript-tests/variable-declaration.js",
@@ -7,3 +7,6 @@ throw new x;
throw {
a: 1
};

debugger
debugger;
@@ -5,3 +5,6 @@ throw(1);
throw"x";
throw new x;
throw {a:1};

debugger
debugger;
@@ -1,3 +1,16 @@
2016-04-21 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: Debugger statement gets a space after it when pretty printed
https://bugs.webkit.org/show_bug.cgi?id=156867
<rdar://problem/25862308>

Reviewed by Geoffrey Garen.

* Tools/Formatting/index.html:
* UserInterface/Workers/Formatter/EsprimaFormatter.js:
(EsprimaFormatter.prototype._handleTokenAtNode):
Handle the unhandled DebuggerStatement node type.

2016-04-20 Joseph Pecoraro <pecoraro@apple.com>

Web Inspector: console.table(navigator) throws exception about `rowPreview.propertyPreviews.length`
@@ -52,8 +52,8 @@ <h1>Debug EsprimaFormatter</h1>
"new-expression.js",
"label-break-continue-block.js",
"with-statement.js",
"throw-statement.js",
"return-statement.js",
"other-statements.js",
"variable-declaration.js",
"functions.js",
"classes.js",
@@ -785,7 +785,8 @@ EsprimaFormatter = class EsprimaFormatter
|| nodeType === "MetaProperty"
|| nodeType === "RestElement"
|| nodeType === "TemplateElement"
|| nodeType === "TemplateLiteral") {
|| nodeType === "TemplateLiteral"
|| nodeType === "DebuggerStatement") {
builder.appendToken(tokenValue, tokenOffset);
return;
}

0 comments on commit 48194af

Please sign in to comment.