[Webkit-unassigned] [Bug 158548] New: REGRESSION: Web Inspector: Should be able to evaluate "{a:1, b:2}" in the console

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 8 15:46:11 PDT 2016


https://bugs.webkit.org/show_bug.cgi?id=158548

            Bug ID: 158548
           Summary: REGRESSION: Web Inspector: Should be able to evaluate
                    "{a:1, b:2}" in the console
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: Web Inspector
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: joepeck at webkit.org
                CC: bburg at apple.com, graouts at webkit.org,
                    joepeck at webkit.org, mattbaker at apple.com,
                    nvasilyev at apple.com, timothy at apple.com,
                    webkit-bug-importer at group.apple.com

* 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 + ")";
>        }
>        ...

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160608/a983bf7e/attachment.html>


More information about the webkit-unassigned mailing list