Bug 47173 - Web Inspector: extract Inspector Instrumentation API as a class
Summary: Web Inspector: extract Inspector Instrumentation API as a class
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: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-05 06:42 PDT by Pavel Podivilov
Modified: 2010-10-07 04:47 PDT (History)
11 users (show)

See Also:


Attachments
Patch. (77.50 KB, patch)
2010-10-05 06:43 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff
Patch. (2.74 KB, patch)
2010-10-05 07:52 PDT, Pavel Podivilov
no flags Details | Formatted Diff | Diff
Comments addressed. (77.95 KB, patch)
2010-10-06 10:07 PDT, Pavel Podivilov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Podivilov 2010-10-05 06:42:53 PDT
Web Inspector: extract Inspector Instrumentation API as a class

Remove references to InspectorTimelineAgent from WebCore.
Comment 1 Pavel Podivilov 2010-10-05 06:43:40 PDT
Created attachment 69777 [details]
Patch.
Comment 2 Pavel Podivilov 2010-10-05 07:52:37 PDT
Created attachment 69783 [details]
Patch.

Comments addressed.
Comment 3 Pavel Podivilov 2010-10-05 08:21:48 PDT
(In reply to comment #2)
> Created an attachment (id=69783) [details]
> Patch.
> 
> Comments addressed.

Wrong patch, sorry.
Comment 4 Ilya Tikhonovsky 2010-10-06 03:10:06 PDT
Comment on attachment 69777 [details]
Patch.

looks good to me
Comment 5 Ilya Tikhonovsky 2010-10-06 03:30:31 PDT
Comment on attachment 69777 [details]
Patch.

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

> WebCore/dom/Node.cpp:2605
> +    int instrumentationCookie = InspectorInstrumentation::willDispatchEvent(document(), *event, targetForWindowEvents, this, ancestors);

Nit: InspectorInstrumentationCookie cookie?

> WebCore/inspector/InspectorInstrumentation.cpp:313
> +    if (InspectorTimelineAgent* timelineAgent = inspectorController->m_timelineAgent.get()) {

Nit: I think it'd be better to have overloaded function for retrieving timelineAgent. like retrieveTimelineAgent(InspectorController*)
Comment 6 Pavel Podivilov 2010-10-06 10:07:52 PDT
Created attachment 69953 [details]
Comments addressed.
Comment 7 Pavel Feldman 2010-10-06 14:02:12 PDT
Comment on attachment 69953 [details]
Comments addressed.

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

> WebCore/ChangeLog:27
> +        (WebCore::InspectorInstrumentation::willInsertDOMNodeImpl):

You should nuke these scary verbose lines.

> WebCore/bindings/v8/V8Proxy.cpp:414
> +    InspectorInstrumentation::didEvaluateScript(m_frame, cookie);

I think cookie should be the first parameter in all the calls.

> WebCore/inspector/InspectorInstrumentation.cpp:-67
> -    if (!inspectorController->hasFrontend())

Why did these go? Please explain in order to get r+.

> WebCore/inspector/InspectorInstrumentation.h:116
> +    static InspectorInstrumentationCookie willCallFunctionImpl(InspectorController*, const String& scriptName, int scriptLine);

This is crazy amount of methods, really easy to make a mistake here. Can we cut the number?
Comment 8 Pavel Podivilov 2010-10-07 01:13:26 PDT
> 
> > WebCore/inspector/InspectorInstrumentation.cpp:-67
> > -    if (!inspectorController->hasFrontend())
> 
> Why did these go? Please explain in order to get r+.

This checks were moved to InspectorInstrumentation::inspectorControllerForPage method.
Comment 9 Pavel Feldman 2010-10-07 02:05:24 PDT
Comment on attachment 69953 [details]
Comments addressed.

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

> WebCore/inspector/InspectorInstrumentation.h:61
> +    static void willSendXMLHttpRequest(ScriptExecutionContext*, const String& url);

LGTM given we migrate to a macro shortly.
Comment 10 Pavel Podivilov 2010-10-07 02:44:11 PDT
Committed r69283: <http://trac.webkit.org/changeset/69283>
Comment 11 Kent Tamura 2010-10-07 03:28:07 PDT
This change broke https://bugs.webkit.org/show_bug.cgi?id=47173 on all platforms.
Comment 12 Kent Tamura 2010-10-07 03:28:47 PDT
(In reply to comment #11)
> This change broke https://bugs.webkit.org/show_bug.cgi?id=47173 on all platforms.

Oops, copy&paste error.

This change broke  http/tests/inspector/console-xhr-logging.html on all platforms.
Comment 13 Pavel Podivilov 2010-10-07 04:47:02 PDT
(In reply to comment #12)
> (In reply to comment #11)
> > This change broke https://bugs.webkit.org/show_bug.cgi?id=47173 on all platforms.
> 
> Oops, copy&paste error.
> 
> This change broke  http/tests/inspector/console-xhr-logging.html on all platforms.

Fixed in r69286.