Closed Bug 668000 Opened 11 years ago Closed 11 years ago

browser_pageInfo.js leaks

Categories

(Firefox :: Page Info Window, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dao, Assigned: dao)

References

Details

(Keywords: memory-leak)

Attachments

(1 obsolete file)

Attached patch patch (obsolete) — Splinter Review
pageInfo.js never removes its callbacks (nor do the consumers remove themsevles), and browser_pageInfo.js doesn't remove its observer.
Attachment #542562 - Flags: review?(gavin.sharp)
I don't really understand why the pageInfo.js changes are needed. How are those arrays special such that the need to be explicitly released on unload?
Anyone can add functions to the arrays. Add-ons do it and browser_bug517902.js does it.
I still don't see why that is a problem. Once the page info window goes away those references should die, whether you null them out explicitly or not.
browser_bug517902.js also holds a reference to the window. I don't know how reliably such cycles are resolved. It's also possible that the observer part alone gets rid of the leaks.
It looked like the pageInfo.js part fixed a bunch of about:blank leaks, but I'm getting unstable results now, so I just landed the browser_pageInfo.js fix.

http://hg.mozilla.org/mozilla-central/rev/03f27e11397f
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Summary: Page Info and Page Info tests leak → browser_pageInfo.js leaks
Attachment #542562 - Attachment is obsolete: true
Attachment #542562 - Flags: review?(gavin.sharp)
Blocks: 767896
You need to log in before you can comment on or make changes to this bug.