Bug 56389 - Web Inspector: split InspectorAgent.populateScriptObjects into more granular agent-specific requests
Summary: Web Inspector: split InspectorAgent.populateScriptObjects into more granular ...
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: Yury Semikhatsky
URL:
Keywords:
Depends on:
Blocks: 54112
  Show dependency treegraph
 
Reported: 2011-03-15 11:01 PDT by Yury Semikhatsky
Modified: 2011-03-15 23:48 PDT (History)
10 users (show)

See Also:


Attachments
Patch (15.48 KB, patch)
2011-03-15 11:04 PDT, Yury Semikhatsky
no flags Details | Formatted Diff | Diff
Patch (15.74 KB, patch)
2011-03-15 22:41 PDT, Yury Semikhatsky
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Yury Semikhatsky 2011-03-15 11:01:06 PDT
Web Inspector: split InspectorAgent.populateScriptObjects into more granular agent-specific requests
Comment 1 Yury Semikhatsky 2011-03-15 11:04:18 PDT
Created attachment 85828 [details]
Patch
Comment 2 Pavel Feldman 2011-03-15 13:14:07 PDT
Comment on attachment 85828 [details]
Patch

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

All looks good except for the getPreferredPanel. We should guess by the event / action.

> Source/WebCore/inspector/Inspector.idl:37
> +        void getPreferredPanel(out String panel);

I don't particularly like it. Inspector should determine preferred panel by itself based on the event that is happening.

> Source/WebCore/inspector/InspectorAgent.cpp:459
>  void InspectorAgent::pushDataCollectedOffline()

It should be renamed to pushWorkers for now? Can we also push them from within debugger::enable instead?

> Source/WebCore/inspector/InspectorDOMAgent.cpp:292
> +    m_document = 0;

Comment would be nice.

> Source/WebCore/inspector/front-end/ProfilesPanel.js:141
> +        ProfilerAgent.isEnabled(function(error, value) {

Please declare a named function.
Comment 3 Yury Semikhatsky 2011-03-15 22:41:56 PDT
Created attachment 85909 [details]
Patch
Comment 4 Yury Semikhatsky 2011-03-15 22:55:53 PDT
(In reply to comment #2)
> (From update of attachment 85828 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=85828&action=review
> 
> All looks good except for the getPreferredPanel. We should guess by the event / action.
> 
Good point. Replaced it with the showPanel event which is already used when the frontend is open.


> > Source/WebCore/inspector/Inspector.idl:37
> > +        void getPreferredPanel(out String panel);
> 
> I don't particularly like it. Inspector should determine preferred panel by itself based on the event that is happening.
> 
See above.

> > Source/WebCore/inspector/InspectorAgent.cpp:459
> >  void InspectorAgent::pushDataCollectedOffline()
> 
> It should be renamed to pushWorkers for now? Can we also push them from within debugger::enable instead?
> 
The code has been inlined into InspectorAgent::setFrontend since it's the only place where it was called. I don't like to move this into the debugger agent now for several reasons: 1) debugger instrumentation is off when there is no front-end while workers data is collected in that case too 2) this code would introduce additional dependency on the inspected page in the debugger agent 3) it will go away once we have native debugger for workers.

> > Source/WebCore/inspector/InspectorDOMAgent.cpp:292
> > +    m_document = 0;
> 
> Comment would be nice.
> 
Done.

> > Source/WebCore/inspector/front-end/ProfilesPanel.js:141
> > +        ProfilerAgent.isEnabled(function(error, value) {
> 
> Please declare a named function.
Done.
Comment 5 Pavel Feldman 2011-03-15 23:05:34 PDT
Comment on attachment 85909 [details]
Patch

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

> Source/WebCore/inspector/InspectorAgent.cpp:401
> +        m_frontend->inspector()->showPanel(m_showPanelAfterVisible);

Just an FYI, no action required: I am still not a fan of it. We should make WebInspector contribute to the Develop menu instead. Hence we would not need to be involved with the panel names on the backend side. Maybe a FIXME here.
Comment 6 Yury Semikhatsky 2011-03-15 23:47:39 PDT
Committed r81222: <http://trac.webkit.org/changeset/81222>
Comment 7 Yury Semikhatsky 2011-03-15 23:48:58 PDT
Comment on attachment 85909 [details]
Patch

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

>> Source/WebCore/inspector/InspectorAgent.cpp:401
>> +        m_frontend->inspector()->showPanel(m_showPanelAfterVisible);
> 
> Just an FYI, no action required: I am still not a fan of it. We should make WebInspector contribute to the Develop menu instead. Hence we would not need to be involved with the panel names on the backend side. Maybe a FIXME here.

Filed a bug on this: https://bugs.webkit.org/show_bug.cgi?id=56451