Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1908)

Unified Diff: Source/devtools/front_end/script_formatter_worker/JavaScriptFormatter.js

Issue 1312033002: DevTools: fix pretty-print of anonymous functions passed as call parameters (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: fix stray changes Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « LayoutTests/inspector/sources/pretty-print-javascript-6-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/script_formatter_worker/JavaScriptFormatter.js
diff --git a/Source/devtools/front_end/script_formatter_worker/JavaScriptFormatter.js b/Source/devtools/front_end/script_formatter_worker/JavaScriptFormatter.js
index 7fce3d006505289c71e9b3fd546a336dbc1e9e9c..6854435711da764a06b621f7d349a6f1e0ec78b3 100644
--- a/Source/devtools/front_end/script_formatter_worker/JavaScriptFormatter.js
+++ b/Source/devtools/front_end/script_formatter_worker/JavaScriptFormatter.js
@@ -268,6 +268,8 @@ FormatterWorker.JavaScriptFormatter.prototype = {
return "";
if (node.parent && node.parent.type === "FunctionExpression" && node.parent.parent && node.parent.parent.type === "Property")
return "";
+ if (node.parent && node.parent.type === "FunctionExpression" && node.parent.parent && node.parent.parent.type === "CallExpression")
+ return "";
if (node.parent && node.parent.type === "DoWhileStatement")
return "";
if (node.parent && node.parent.type === "TryStatement" && node.parent.block == node)
« no previous file with comments | « LayoutTests/inspector/sources/pretty-print-javascript-6-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698