[webkit-reviews] review granted: [Bug 200800] Web Inspector: JavaScript formatting of single statement arrow function can be poor : [Attachment 376448] [PATCH] Proposed Fix
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Aug 16 11:11:48 PDT 2019
Ross Kirsling <ross.kirsling at sony.com> has granted Joseph Pecoraro
<joepeck at webkit.org>'s request for review:
Bug 200800: Web Inspector: JavaScript formatting of single statement arrow
function can be poor
https://bugs.webkit.org/show_bug.cgi?id=200800
Attachment 376448: [PATCH] Proposed Fix
https://bugs.webkit.org/attachment.cgi?id=376448&action=review
--- Comment #4 from Ross Kirsling <ross.kirsling at sony.com> ---
Comment on attachment 376448
--> https://bugs.webkit.org/attachment.cgi?id=376448
[PATCH] Proposed Fix
View in context: https://bugs.webkit.org/attachment.cgi?id=376448&action=review
Seems like a reasonable improvement. I agree with your renaming suggestion too.
> Source/WebInspectorUI/UserInterface/Workers/Formatter/EsprimaFormatter.js:196
> + if (nodeType === "ExpressionStatement")
> + return false;
This shouldn't be necessary. (Unless it's meant as an optimization? But in that
case it'd be incomplete, and you'd probably want to opt for a switch...)
> Source/WebInspectorUI/UserInterface/Workers/Formatter/EsprimaFormatter.js:206
> + || nodeType === "FunctionDeclaration"
"ClassDeclaration" too, right?
More information about the webkit-reviews
mailing list