RESOLVED FIXED 158548
REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console
https://bugs.webkit.org/show_bug.cgi?id=158548
Summary REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the con...
Joseph Pecoraro
Reported 2016-06-08 15:46:11 PDT
* Summary Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console * Notes - Looks like this regressed when adding the console evaluation names - The sourceURL is appended to the evaluation text before runtime manager has looked at it - And runtime manager is where we add the convenience > consolePromptTextCommitted(prompt, text) > { > ... > text = appendWebInspectorConsoleEvaluationSourceURL(text); > > WebInspector.runtimeManager.evaluateInInspectedWindow(text, WebInspector.RuntimeManager.ConsoleObjectGroup, true, false, false, true, true, printResult.bind(this)); > } > evaluateInInspectedWindow(expression, objectGroup, includeCommandLineAPI, doNotPauseOnExceptionsAndMuteConsole, returnByValue, generatePreview, saveResult, callback) > { > if (!expression) { > // There is no expression, so the completion should happen against global properties. > expression = "this"; > } else if (/^\s*\{/.test(expression) && /\}\s*$/.test(expression)) { > // Transform {a:1} to ({a:1}) so it is treated like an object literal instead of a block with a label. > expression = "(" + expression + ")"; > } > ...
Attachments
[PATCH] Proposed Fix (25.00 KB, patch)
2016-06-08 18:45 PDT, Joseph Pecoraro
no flags
Joseph Pecoraro
Comment 1 2016-06-08 15:47:05 PDT
Lets just move the convenience to consolePromptTextCommitted. It really is the only place I think we expect this to happen right now.
Radar WebKit Bug Importer
Comment 2 2016-06-08 15:49:13 PDT
Joseph Pecoraro
Comment 3 2016-06-08 18:45:48 PDT
Created attachment 280866 [details] [PATCH] Proposed Fix
WebKit Commit Bot
Comment 4 2016-06-08 23:19:26 PDT
Comment on attachment 280866 [details] [PATCH] Proposed Fix Clearing flags on attachment: 280866 Committed r201855: <http://trac.webkit.org/changeset/201855>
WebKit Commit Bot
Comment 5 2016-06-08 23:19:30 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.