Closed Bug 610571 Opened 14 years ago Closed 14 years ago

Leak with crazy iframe testcase

Categories

(Core :: DOM: Core & HTML, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- final+
status1.9.2 --- ?
status1.9.1 --- ?

People

(Reporter: jruderman, Assigned: smaug)

Details

(Keywords: memory-leak, testcase, Whiteboard: [hardblocker])

Attachments

(5 files, 1 obsolete file)

Attached file testcase
Steps:
1. Run with XPCOM_MEM_LEAK_LOG=2
2. Load the testcase.
3. Quit.

Result:
* trace-refcnt reports leaks (8 nsGlobalWindow, 19 nsDocument, 2 nsDocShell)
blocking2.0: --- → ?
Peter, this may be worth looking into as you're debugging similar leaks. Not sure this is strictly a blocker, but blocking for now.
Assignee: nobody → peterv
blocking2.0: ? → final+
Whiteboard: hardblocker
The test case seems to leak in 1.9.1 and 1.9.2 too.
status1.9.1: --- → ?
status1.9.2: --- → ?
OS: Mac OS X → All
Hardware: x86 → All
Mounir is looking into this, reassigning.
Assignee: peterv → mounir.lamouri
Whiteboard: hardblocker → [hardblocker]
Attached patch an assertionSplinter Review
The testcase causes this assertion to fire.
We probably should do this, though we should perhaps also
traverse docshell's mScriptGlobal and mContentViewer
(and make DocumentViewerImpl ccollectable).
Comment on attachment 502221 [details] [diff] [review]
Don't load if the owner document isn't active

Boris, what do you think about this.
We sure shouldn't try to load the frame if ownerDoc
has already been removed from its docshell.
Attachment #502221 - Flags: review?(bzbarsky)
Attached patch WIP PatchSplinter Review
So, this patch should correspond to what Olli suggests in comment 5 but it's crashing :(
Whatever the reason of this crash is, I guess we should stay with Olli's patch for Firefox 4 given that this is fixing the issue and this patch is changing nsIDocShell uuid.
Assigning the bug to Olli given that he has a working and simple patch.
Assignee: mounir.lamouri → Olli.Pettay
Comment on attachment 502221 [details] [diff] [review]
Don't load if the owner document isn't active

This looks fine to me, but the comment needs changing a bit.  r=me with that.
Attachment #502221 - Flags: review?(bzbarsky) → review+
Oh, and can you add a test?
Attached patch +commentSplinter Review
Attachment #502221 - Attachment is obsolete: true
I hope I can use Jesse's test as a chashtest
crashtest
Attached patch +testSplinter Review
http://hg.mozilla.org/mozilla-central/rev/cee083078957
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: