Bug 100695 - Web Inspector: Output code evaluated in the console the same as console.log
Summary: Web Inspector: Output code evaluated in the console the same as console.log
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nikita Vasilyev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-29 13:47 PDT by Nikita Vasilyev
Modified: 2012-11-01 05:17 PDT (History)
11 users (show)

See Also:


Attachments
Patch (26.26 KB, patch)
2012-10-30 00:39 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (37.70 KB, patch)
2012-10-31 08:45 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (39.63 KB, patch)
2012-10-31 08:48 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (40.50 KB, patch)
2012-11-01 01:29 PDT, Yury Semikhatsky
pfeldman: review+
pfeldman: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nikita Vasilyev 2012-10-29 13:47:35 PDT
console.log shows a nice summary of an object:

> obj = {x: 1}
> console.log(obj)
Object {x: 1}

Just typing a variable name in the console shows it the old uninformative way:

> obj
Object

I expect it to work the same as console.log
Comment 1 Yury Semikhatsky 2012-10-30 00:39:38 PDT
Created attachment 171382 [details]
Patch
Comment 2 WebKit Review Bot 2012-10-30 00:42:06 PDT
Attachment 171382 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1
Source/WebCore/inspector/InjectedScript.cpp:64:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.cpp:75:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.cpp:86:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorRuntimeAgent.h:71:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InspectorDebuggerAgent.h:110:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InjectedScript.h:61:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InjectedScript.h:79:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 7 in 13 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 3 WebKit Review Bot 2012-10-30 02:41:05 PDT
Comment on attachment 171382 [details]
Patch

Attachment 171382 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/14632417

New failing tests:
inspector/console/console-eval-global.html
inspector/debugger/event-listener-breakpoints.html
inspector/debugger/eval-on-pause-blocked.html
inspector/debugger/debugger-eval-while-paused.html
inspector/debugger/debugger-no-nested-pause.html
inspector/console/command-line-api-inspect.html
http/tests/inspector/network/network-initiator-from-console.html
inspector/console/console-api-on-call-frame.html
inspector/console/console-format.html
http/tests/inspector/console-cd-completions.html
inspector/debugger/debugger-eval-on-call-frame.html
inspector/console/command-line-api.html
inspector/console/console-eval-undefined-override.html
inspector/debugger/debugger-suspend-active-dom-objects.html
Comment 4 Build Bot 2012-10-30 03:53:28 PDT
Comment on attachment 171382 [details]
Patch

Attachment 171382 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14625529

New failing tests:
inspector/console/console-eval-global.html
inspector/console/console-api-on-call-frame.html
inspector/debugger/eval-on-pause-blocked.html
inspector/debugger/debugger-no-nested-pause.html
inspector/console/command-line-api-inspect.html
inspector/debugger/disable-script.html
http/tests/inspector/network/network-initiator-from-console.html
inspector/debugger/debugger-eval-while-paused.html
inspector/console/console-format.html
inspector/debugger/function-details.html
inspector/console/console-eval-undefined-override.html
inspector/debugger/debugger-eval-on-call-frame.html
inspector/console/command-line-api.html
inspector/debugger/debugger-suspend-active-dom-objects.html
Comment 5 Pavel Feldman 2012-10-31 05:11:05 PDT
Comment on attachment 171382 [details]
Patch

You probably want to rebaseline some tests.
Comment 6 Yury Semikhatsky 2012-10-31 08:45:50 PDT
Created attachment 171666 [details]
Patch
Comment 7 WebKit Review Bot 2012-10-31 08:47:38 PDT
Attachment 171666 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/inspector/console/command-line..." exit_code: 1
Source/WebCore/inspector/InjectedScript.cpp:64:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.cpp:75:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.cpp:86:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorRuntimeAgent.h:71:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InjectedScript.h:61:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InjectedScript.h:79:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InspectorDebuggerAgent.h:110:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 7 in 22 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Yury Semikhatsky 2012-10-31 08:48:48 PDT
Created attachment 171668 [details]
Patch
Comment 9 Yury Semikhatsky 2012-10-31 08:49:26 PDT
(In reply to comment #5)
> (From update of attachment 171382 [details])
> You probably want to rebaseline some tests.

Indeed. Updated expectations to include object preview for evaluation results.
Comment 10 WebKit Review Bot 2012-10-31 08:50:59 PDT
Attachment 171668 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/insp..." exit_code: 1
Source/WebCore/inspector/InjectedScript.cpp:64:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.cpp:75:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.cpp:86:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorRuntimeAgent.h:71:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InjectedScript.h:61:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InjectedScript.h:79:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InspectorDebuggerAgent.h:110:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 7 in 23 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 11 Build Bot 2012-10-31 12:01:18 PDT
Comment on attachment 171668 [details]
Patch

Attachment 171668 [details] did not pass mac-ews (mac):
Output: http://queues.webkit.org/results/14656247

New failing tests:
http/tests/inspector/network/network-initiator-from-console.html
Comment 12 Yury Semikhatsky 2012-11-01 01:29:58 PDT
Created attachment 171792 [details]
Patch
Comment 13 WebKit Review Bot 2012-11-01 01:33:19 PDT
Attachment 171792 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'LayoutTests/ChangeLog', u'LayoutTests/http..." exit_code: 1
Source/WebCore/inspector/InjectedScript.cpp:64:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.cpp:75:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InjectedScript.cpp:86:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Source/WebCore/inspector/InspectorRuntimeAgent.h:71:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InjectedScript.h:61:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InjectedScript.h:79:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Source/WebCore/inspector/InspectorDebuggerAgent.h:110:  Weird number of spaces at line-start.  Are you using a 4-space indent?  [whitespace/indent] [3]
Total errors found: 7 in 24 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 Pavel Feldman 2012-11-01 04:10:46 PDT
Comment on attachment 171792 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=171792&action=review

> Source/WebCore/inspector/front-end/ConsoleMessage.js:358
> +    useArrayPreviewInFormatter: function(array)

Please annotate this method.
Comment 15 Yury Semikhatsky 2012-11-01 05:16:20 PDT
(In reply to comment #14)
> (From update of attachment 171792 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=171792&action=review
> 
> > Source/WebCore/inspector/front-end/ConsoleMessage.js:358
> > +    useArrayPreviewInFormatter: function(array)
> 
> Please annotate this method.

Done.
Comment 16 Yury Semikhatsky 2012-11-01 05:17:26 PDT
Committed r133150: <http://trac.webkit.org/changeset/133150>