Closed Bug 669178 Opened 13 years ago Closed 13 years ago

InspectorUI.embeddedBrowserParents seems to be broken and leaks content windows

Categories

(DevTools :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Firefox 7

People

(Reporter: dao, Assigned: dao)

References

Details

(Keywords: memory-leak)

Attachments

(1 file)

Attached patch patchSplinter Review
I don't understand what this code is trying to do, but it looks like it can't possibly work. embeddedBrowserParents looks like it tries to reflect node relationships, but object keys can only be strings, not objects.

Windows with nodes ending up as values in InspectorUI.embeddedBrowserParents are leaked, as that object is never cleared.
Attachment #543780 - Flags: review?(gavin.sharp)
This is responsible for the following browser-chrome test leaks (bug 658738):

2 http://mochi.test:8888/browser/browser/base/content/test/inspector/browser_inspector_treePanel_input.html
1 data:text/html,iframe%20tests%20for%20inspector
1 data:text/html,little%20iframe
1 data:text/html,mouse%20scrolling%20test%20for%20inspector
oh. wow. nice catch.

This code came over wholesale from firebug. I think Paul's fix for bug 665880 revealed this. Code path might have been unreachable before.
This leaked before bug 665880 got fixed, as far as I can tell.
Comment on attachment 543780 [details] [diff] [review]
patch

the embeddedBrowserParents object contains references to iframe subdocuments. Nodes that should be skipped by the tree panel during construction or display.

Does the HTML panel still work with this patch applied?
> Does the HTML panel still work with this patch applied?

I'm not sure what exactly I should be looking for. The tests are passing. Is this meaningful evidence?
yes it is. We have some iframe tests in the suite.

I ran a build and it works fine on gmail which is pretty iframe heavy.
Comment on attachment 543780 [details] [diff] [review]
patch

r+ for me.
Attachment #543780 - Flags: review+
Attachment #543780 - Flags: review?(gavin.sharp) → review+
http://hg.mozilla.org/mozilla-central/rev/6c2d53b98177
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 7
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: