Bug 94351 - Web Inspector: make profiles panel a lazily loaded module.
Summary: Web Inspector: make profiles panel a lazily loaded module.
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (Deprecated) (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Pavel Feldman
URL:
Keywords:
Depends on: 94389
Blocks:
  Show dependency treegraph
 
Reported: 2012-08-17 08:30 PDT by Pavel Feldman
Modified: 2014-12-12 13:43 PST (History)
11 users (show)

See Also:


Attachments
Patch (35.44 KB, patch)
2012-08-17 08:48 PDT, Pavel Feldman
yurys: review+
webkit.review.bot: commit-queue-
Details | Formatted Diff | Diff
[Patch] for landing (36.13 KB, patch)
2012-08-17 09:18 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
[Patch] for landing 2 (36.70 KB, patch)
2012-08-17 09:32 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
[Patch] for landing 3 (38.21 KB, patch)
2012-08-17 10:06 PDT, Pavel Feldman
no flags Details | Formatted Diff | Diff
Archive of layout-test-results from gce-cr-linux-04 (519.98 KB, application/zip)
2012-08-17 12:05 PDT, WebKit Review Bot
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Pavel Feldman 2012-08-17 08:30:18 PDT
Patch to follow.
Comment 1 Pavel Feldman 2012-08-17 08:48:03 PDT
Created attachment 159134 [details]
Patch
Comment 2 Yury Semikhatsky 2012-08-17 09:07:24 PDT
Comment on attachment 159134 [details]
Patch

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

> Source/WebCore/inspector/front-end/HeapSnapshotView.js:411
> +        return this.parent.getProfiles(WebInspector.HeapSnapshotProfileType.TypeId);

I'd wrap this.parent into a _profilesPanel() getter.

> Source/WebCore/inspector/front-end/InspectorFrontendAPI.js:60
> +        return WebInspector.panels.profiles && WebInspector.CPUProfileType.instance && WebInspector.CPUProfileType.instance.isRecordingProfile();

Is this change really needed?

> Source/WebCore/inspector/front-end/ProfilesPanel.js:1102
> +        if (WebInspector.inspectorView.currentPanel() !== WebInspector.ProfilesPanel._instance)

Please pass reference to ProfilesPanel directly into RevealInHeapSnapshotContextMenuProvider constructor. You wouldn't need WebInspector.ProfilesPanel._instance then.
Comment 3 Pavel Feldman 2012-08-17 09:18:00 PDT
(In reply to comment #2)
> (From update of attachment 159134 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=159134&action=review
> 
> > Source/WebCore/inspector/front-end/HeapSnapshotView.js:411
> > +        return this.parent.getProfiles(WebInspector.HeapSnapshotProfileType.TypeId);
> 
> I'd wrap this.parent into a _profilesPanel() getter.
> 

I think it should be renamed, but I am hesitant touching this .parent guy - it all may collapse :). On a broader note, I don't think view needs a pointer to the panel - we need to fix the design.

> > Source/WebCore/inspector/front-end/InspectorFrontendAPI.js:60
> > +        return WebInspector.panels.profiles && WebInspector.CPUProfileType.instance && WebInspector.CPUProfileType.instance.isRecordingProfile();
> 
> Is this change really needed?
> 

Yes, on default WebKit container, if module is not yet loaded, then profiling is not enabled.

> > Source/WebCore/inspector/front-end/ProfilesPanel.js:1102
> > +        if (WebInspector.inspectorView.currentPanel() !== WebInspector.ProfilesPanel._instance)
> 
> Please pass reference to ProfilesPanel directly into RevealInHeapSnapshotContextMenuProvider constructor. You wouldn't need WebInspector.ProfilesPanel._instance then.

As we agreed offline, it is a part of a bigger change.

Uploading new version of the patch with tests fixed.
Comment 4 Pavel Feldman 2012-08-17 09:18:22 PDT
Created attachment 159138 [details]
[Patch] for landing
Comment 5 Pavel Feldman 2012-08-17 09:32:30 PDT
Created attachment 159141 [details]
[Patch] for landing 2
Comment 6 Pavel Feldman 2012-08-17 10:06:00 PDT
Created attachment 159146 [details]
[Patch] for landing 3
Comment 7 WebKit Review Bot 2012-08-17 11:57:40 PDT
Comment on attachment 159146 [details]
[Patch] for landing 3

Clearing flags on attachment: 159146

Committed r125922: <http://trac.webkit.org/changeset/125922>
Comment 8 WebKit Review Bot 2012-08-17 12:05:05 PDT
Comment on attachment 159134 [details]
Patch

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

New failing tests:
inspector/profiler/heap-snapshot-loader.html
Comment 9 WebKit Review Bot 2012-08-17 12:05:40 PDT
Created attachment 159173 [details]
Archive of layout-test-results from gce-cr-linux-04

The attached test failures were seen while running run-webkit-tests on the chromium-ews.
Bot: gce-cr-linux-04  Port: <class 'webkitpy.common.config.ports.ChromiumXVFBPort'>  Platform: Linux-2.6.39-gcg-201203291735-x86_64-with-Ubuntu-10.04-lucid
Comment 10 Brian Burg 2014-12-12 13:41:07 PST
Closing as invalid, as this bug pertains to the old inspector UI and/or its tests.
Please file a new bug (https://www.webkit.org/new-inspector-bug) if the bug/feature/issue is still relevant to WebKit trunk.