Bug 430921 - "chrome mochitest for bug 304188 leaks the world" [p=chris@pearce.org.nz (Chris Pearce [cpearce]) r+sr=peterv a1.9=damons]

git-svn-id: svn://10.0.0.236/trunk@251311 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
reed%reedloden.com
2008-05-07 10:18:31 +00:00
parent 49901c64f5
commit ff35e9f585
2 changed files with 7 additions and 2 deletions

View File

@@ -3670,6 +3670,13 @@ nsDocShell::Destroy()
// Fire unload event before we blow anything away.
(void) FirePageHideNotification(PR_TRUE);
// Clear pointers to any detached nsEditorData that's lying
// around in shistory entries. Breaks cycle. See bug 430921.
if (mOSHE)
mOSHE->SetEditorData(nsnull);
if (mLSHE)
mLSHE->SetEditorData(nsnull);
// Note: mContentListener can be null if Init() failed and we're being
// called from the destructor.
if (mContentListener) {