Bug 76533 - Web Inspector: resource tree model leaks frames
Summary: Web Inspector: resource tree model leaks frames
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: Andrey Kosyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-18 05:31 PST by Andrey Kosyakov
Modified: 2012-01-18 07:22 PST (History)
10 users (show)

See Also:


Attachments
Patch (2.27 KB, patch)
2012-01-18 05:57 PST, Andrey Kosyakov
no flags Details | Formatted Diff | Diff
Patch (2.46 KB, patch)
2012-01-18 06:30 PST, Andrey Kosyakov
pfeldman: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrey Kosyakov 2012-01-18 05:31:30 PST
We never remove frames from ResourceTreeModel._frames.
To test for that:
- open inspector
- navigate to a few sites
- open inspector on inspector
- check WebInspector.resourceTreeModel._frames -- it contains frames belonging to all sites visited.
Comment 1 Andrey Kosyakov 2012-01-18 05:57:14 PST
Created attachment 122910 [details]
Patch
Comment 2 Pavel Feldman 2012-01-18 06:10:57 PST
Comment on attachment 122910 [details]
Patch

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

> Source/WebCore/inspector/front-end/ResourceTreeModel.js:199
> +    _removeFrame: function(frame)

This method should be defined in frame.
Comment 3 Andrey Kosyakov 2012-01-18 06:30:09 PST
Created attachment 122917 [details]
Patch
Comment 4 Pavel Feldman 2012-01-18 07:08:56 PST
Comment on attachment 122917 [details]
Patch

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

> Source/WebCore/inspector/front-end/ResourceTreeModel.js:524
> +        frame._remove();

I think this should be the last line in the method (after the childFrames.remove)

> Source/WebCore/inspector/front-end/ResourceTreeModel.js:538
> +        this._model.dispatchEventToListeners(WebInspector.ResourceTreeModel.EventTypes.FrameDetached, this);

Also, dispatch as the last line.
Comment 5 Andrey Kosyakov 2012-01-18 07:22:28 PST
Committed r105274: <http://trac.webkit.org/changeset/105274>