Closed
Bug 430921
Opened 17 years ago
Closed 17 years ago
chrome mochitest for bug 304188 leaks the world
Categories
(Core :: DOM: Editor, defect)
Tracking
()
RESOLVED
FIXED
mozilla1.9
People
(Reporter: ajschult784, Assigned: cpearce)
References
Details
(Keywords: memory-leak, regression)
Attachments
(2 files, 1 obsolete file)
29.53 KB,
text/plain
|
Details | |
2.65 KB,
patch
|
Details | Diff | Splinter Review |
With current trunk SeaMonkey, the chrome mochitest for bug 304188 (chrome/toolkit/content/tests/chrome/test_bug304188.xul) leaks the world. This started with bug 386782. Leak log is attached.
Assignee | ||
Comment 1•17 years ago
|
||
* Fixed the leak. It was caused by the nsSHEntry stored in nsDocShell::mOSHE holding a raw pointer to a detached mEditorData, a non-xpcom class. The nsEditorData held xpcom-references into the editor, editor session, and the editor's listeners. Somewhere in there was a cycle or something which was preventing the nsSHEntry from being collected, causing the leak. Explicitly freeing nsDocShell's mOSHE->mEditorData and mLSHE->mEditorData in nsDocShell::Destroy() fixes the leak.
* Removes the assertions in mEditorFlags must be non-zero in nsEditingSession::DetachFromWindow()/ReattachToWindow(). mEditorFlags can be zero if we have a non-interactive HTMLEditor. This occurs in the testcase that was leaking.
Updated•17 years ago
|
Attachment #318739 -
Flags: superreview+
Attachment #318739 -
Flags: review?(peterv)
Attachment #318739 -
Flags: review+
Assignee | ||
Comment 2•17 years ago
|
||
Comment on attachment 318739 [details] [diff] [review]
v1
Requesting approval 1.9. This is a low risk patch which stops a memory leak.
Attachment #318739 -
Flags: approval1.9?
Comment 3•17 years ago
|
||
Comment on attachment 318739 [details] [diff] [review]
v1
a1.9+=damons
Attachment #318739 -
Flags: approval1.9? → approval1.9+
Assignee | ||
Updated•17 years ago
|
Keywords: checkin-needed
Whiteboard: [needs landing]
Comment 4•17 years ago
|
||
Updated•17 years ago
|
Attachment #318739 -
Attachment is obsolete: true
Comment 5•17 years ago
|
||
Checking in docshell/base/nsDocShell.cpp;
/cvsroot/mozilla/docshell/base/nsDocShell.cpp,v <-- nsDocShell.cpp
new revision: 1.902; previous revision: 1.901
done
Checking in editor/composer/src/nsEditingSession.cpp;
/cvsroot/mozilla/editor/composer/src/nsEditingSession.cpp,v <-- nsEditingSession.cpp
new revision: 1.63; previous revision: 1.62
done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: [needs landing]
Target Milestone: --- → mozilla1.9
Comment 6•17 years ago
|
||
Backed out to see if this is causing crashes.
Assignee | ||
Comment 7•17 years ago
|
||
Did this cause crashes?
Comment 8•17 years ago
|
||
Looks like those were due to bug 432492. We should reland this when the tree reopens.
Comment 9•17 years ago
|
||
Relanded.
Checking in docshell/base/nsDocShell.cpp;
/cvsroot/mozilla/docshell/base/nsDocShell.cpp,v <-- nsDocShell.cpp
new revision: 1.904; previous revision: 1.903
done
Checking in editor/composer/src/nsEditingSession.cpp;
/cvsroot/mozilla/editor/composer/src/nsEditingSession.cpp,v <-- nsEditingSession.cpp
new revision: 1.65; previous revision: 1.64
done
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Comment 10•17 years ago
|
||
Backed out again, as we're crashing again. Either this patch or bug 422172 is causing the crashes.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Updated•17 years ago
|
Keywords: checkin-needed
Comment 11•17 years ago
|
||
Relanded (again). I forgot to repackage jemalloc, so I bet that was causing the crashes. I don't know for sure yet, though.
Checking in docshell/base/nsDocShell.cpp;
/cvsroot/mozilla/docshell/base/nsDocShell.cpp,v <-- nsDocShell.cpp
new revision: 1.906; previous revision: 1.905
done
Checking in editor/composer/src/nsEditingSession.cpp;
/cvsroot/mozilla/editor/composer/src/nsEditingSession.cpp,v <-- nsEditingSession.cpp
new revision: 1.67; previous revision: 1.66
done
Status: REOPENED → RESOLVED
Closed: 17 years ago → 17 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•