From daf8d7f24a94cf1e8e616d9dc27b2cce76a12b7e Mon Sep 17 00:00:00 2001 From: "jst%mozilla.jstenback.com" Date: Wed, 18 Aug 2004 22:13:10 +0000 Subject: [PATCH] Fixing bug 198254. Fix crash when closing javascript created window. r+sr=bzbarsky@mit.edu git-svn-id: svn://10.0.0.236/trunk@160932 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/base/nsPresShell.cpp | 3 +++ mozilla/layout/html/base/src/nsPresShell.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/mozilla/layout/base/nsPresShell.cpp b/mozilla/layout/base/nsPresShell.cpp index bd04e671115..d2c1860f227 100644 --- a/mozilla/layout/base/nsPresShell.cpp +++ b/mozilla/layout/base/nsPresShell.cpp @@ -1928,6 +1928,9 @@ PresShell::Destroy() // pres shell to NULL if (mPresContext) { mPresContext->SetShell(nsnull); + + // Clear the link handler (weak reference) as well + mPresContext->SetLinkHandler(nsnull); } if (mViewEventListener) { diff --git a/mozilla/layout/html/base/src/nsPresShell.cpp b/mozilla/layout/html/base/src/nsPresShell.cpp index bd04e671115..d2c1860f227 100644 --- a/mozilla/layout/html/base/src/nsPresShell.cpp +++ b/mozilla/layout/html/base/src/nsPresShell.cpp @@ -1928,6 +1928,9 @@ PresShell::Destroy() // pres shell to NULL if (mPresContext) { mPresContext->SetShell(nsnull); + + // Clear the link handler (weak reference) as well + mPresContext->SetLinkHandler(nsnull); } if (mViewEventListener) {