Bug 127941 - Web Inspector: Add Console support to JSContext Inspection
Summary: Web Inspector: Add Console support to JSContext Inspection
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Joseph Pecoraro
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2014-01-30 13:07 PST by Joseph Pecoraro
Modified: 2014-02-06 15:41 PST (History)
8 users (show)

See Also:


Attachments
[PATCH] Proposed Fix (369.55 KB, patch)
2014-02-03 12:09 PST, Joseph Pecoraro
ggaren: review+
joepeck: commit-queue-
Details | Formatted Diff | Diff
[PATCH] For Bots (371.25 KB, patch)
2014-02-03 13:13 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] For Bots 2 (374.38 KB, patch)
2014-02-03 14:48 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] For Bots 3 (375.39 KB, patch)
2014-02-03 17:26 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] For Bots 4 (375.49 KB, patch)
2014-02-03 23:53 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] For Bots 5 (377.84 KB, patch)
2014-02-06 12:00 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff
[PATCH] For Bots 6 (377.79 KB, patch)
2014-02-06 13:24 PST, Joseph Pecoraro
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Pecoraro 2014-01-30 13:07:34 PST
We need the ConsoleAgent in JavaScriptCore for JSContext inspection for things like:

    - backend sending console messages to frontend on exceptions
    - eventually hooking into $1..$9 CommandLineAPI support in a non-Web context (DOM Nodes / Profiles Nodes)
Comment 1 Radar WebKit Bug Importer 2014-01-30 13:08:12 PST
<rdar://problem/15949979>
Comment 2 Joseph Pecoraro 2014-02-03 12:09:07 PST
Created attachment 223006 [details]
[PATCH] Proposed Fix

One test is failing after this, so cq- while I work on that. Also, I expect to see triage other port build issues.
Comment 3 Joseph Pecoraro 2014-02-03 12:09:44 PST
This doesn't send messages on exceptions yet. This is just all the machinery (ConsoleAgent) needed to make that possible.
Comment 4 WebKit Commit Bot 2014-02-03 12:11:37 PST
Attachment 223006 [details] did not pass style-queue:


ERROR: Source/WebCore/inspector/WebConsoleAgent.cpp:110:  Should be indented on a separate line, with the colon or comma first on that line.  [whitespace/indent] [4]
ERROR: Source/WebCore/inspector/CommandLineAPIHost.h:67:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WebCore/inspector/InspectorConsoleInstrumentation.h:190:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/JavaScriptCore/inspector/scripts/generate-combined-inspector-json.py:69:  blank line at end of file  [pep8/W391] [5]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:32:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:33:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:39:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/workers/WorkerMessagingProxy.cpp:49:  Alphabetical sorting problem.  [build/include_order] [4]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:227:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:407:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 10 in 147 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 5 Geoffrey Garen 2014-02-03 12:30:23 PST
Comment on attachment 223006 [details]
[PATCH] Proposed Fix

r=me, once the build works
Comment 6 Joseph Pecoraro 2014-02-03 13:13:47 PST
Created attachment 223014 [details]
[PATCH] For Bots
Comment 7 WebKit Commit Bot 2014-02-03 13:17:50 PST
Attachment 223014 [details] did not pass style-queue:


ERROR: Source/WebCore/inspector/InspectorConsoleInstrumentation.h:190:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/JavaScriptCore/inspector/scripts/generate-combined-inspector-json.py:69:  blank line at end of file  [pep8/W391] [5]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:32:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:33:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:39:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:227:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:407:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 7 in 147 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 8 Joseph Pecoraro 2014-02-03 14:48:21 PST
Created attachment 223023 [details]
[PATCH] For Bots 2

This patch fixes the test and actually gets a test progression. I haven't yet run all tests though, just inspector related ones.
Comment 9 WebKit Commit Bot 2014-02-03 15:34:27 PST
Attachment 223023 [details] did not pass style-queue:


ERROR: Source/WebCore/inspector/InspectorConsoleInstrumentation.h:190:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/JavaScriptCore/inspector/scripts/generate-combined-inspector-json.py:69:  blank line at end of file  [pep8/W391] [5]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:32:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:33:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:39:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:227:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:407:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 7 in 149 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 10 Joseph Pecoraro 2014-02-03 17:26:09 PST
Created attachment 223049 [details]
[PATCH] For Bots 3

Fixed a Windows and GTK issue.
Comment 11 WebKit Commit Bot 2014-02-03 17:29:19 PST
Attachment 223049 [details] did not pass style-queue:


ERROR: Source/WebCore/inspector/InspectorConsoleInstrumentation.h:190:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/JavaScriptCore/inspector/scripts/generate-combined-inspector-json.py:69:  blank line at end of file  [pep8/W391] [5]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:32:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:33:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:39:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:227:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:407:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 7 in 149 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 12 Joseph Pecoraro 2014-02-03 23:53:11 PST
Created attachment 223077 [details]
[PATCH] For Bots 4

Try the bots again, same patch rebased.
Comment 13 WebKit Commit Bot 2014-02-03 23:56:00 PST
Attachment 223077 [details] did not pass style-queue:


ERROR: Source/WebCore/inspector/InspectorConsoleInstrumentation.h:190:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/JavaScriptCore/inspector/scripts/generate-combined-inspector-json.py:69:  blank line at end of file  [pep8/W391] [5]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:32:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:33:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:39:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:227:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:407:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 7 in 149 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 14 Alexey Proskuryakov 2014-02-04 12:35:59 PST
Mac bots are yellow, meaning that there are a lot of flakes.
Comment 15 Joseph Pecoraro 2014-02-04 13:08:08 PST
I think it might have a legitimate issue with:
http/tests/inspector-protocol/loading-iframe-document-node.html

But I'm not sure if this patch introduced it. I feel like that is a separate issue (listing isolated contexts they somehow have the same ExecState as the main context)?
Comment 16 Joseph Pecoraro 2014-02-05 12:16:26 PST
(In reply to comment #15)
> I think it might have a legitimate issue with:
> http/tests/inspector-protocol/loading-iframe-document-node.html
> 
> But I'm not sure if this patch introduced it. I feel like that is a separate issue (listing isolated contexts they somehow have the same ExecState as the main context)?

Well, I verified this is caused by my patch. I'll debug it.
Comment 17 Joseph Pecoraro 2014-02-06 12:00:51 PST
Created attachment 223360 [details]
[PATCH] For Bots 5

Fixed the test failure. I have a good feeling about this one.
Comment 18 WebKit Commit Bot 2014-02-06 12:04:31 PST
Attachment 223360 [details] did not pass style-queue:


ERROR: Source/WebCore/loader/ImageLoader.cpp:298:  When wrapping a line, only indent 4 spaces.  [whitespace/indent] [3]
ERROR: Source/WebCore/inspector/InspectorConsoleInstrumentation.h:190:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/JavaScriptCore/inspector/scripts/generate-combined-inspector-json.py:69:  blank line at end of file  [pep8/W391] [5]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:32:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:33:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:39:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:227:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:407:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 8 in 151 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 19 Joseph Pecoraro 2014-02-06 13:24:59 PST
Created attachment 223374 [details]
[PATCH] For Bots 6
Comment 20 WebKit Commit Bot 2014-02-06 13:27:43 PST
Attachment 223374 [details] did not pass style-queue:


ERROR: Source/WebCore/inspector/InspectorConsoleInstrumentation.h:190:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/JavaScriptCore/inspector/scripts/generate-combined-inspector-json.py:69:  blank line at end of file  [pep8/W391] [5]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:32:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:33:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/JavaScriptCore/inspector/ConsoleTypes.h:39:  enum members should use InterCaps with an initial capital letter.  [readability/enum_casing] [4]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:227:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
ERROR: Source/WebCore/inspector/InspectorInstrumentation.h:407:  The parameter type should use PassRefPtr instead of RefPtr.  [readability/pass_ptr] [5]
Total errors found: 7 in 151 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 21 Joseph Pecoraro 2014-02-06 15:41:38 PST
<http://trac.webkit.org/changeset/163568>.