From ecfed0d85b0b06e26318915efa11c0c239711cfa Mon Sep 17 00:00:00 2001 From: "locka%iol.ie" Date: Tue, 21 Aug 2001 00:50:26 +0000 Subject: [PATCH] Fix for anchors that try and load content into a docshell that has already been destroyed. b=94229 r=ccarlen@netscape.com sr=rpotts@netscape.com git-svn-id: svn://10.0.0.236/trunk@101446 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/docshell/base/nsDocShell.cpp | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/mozilla/docshell/base/nsDocShell.cpp b/mozilla/docshell/base/nsDocShell.cpp index 1cac8656a7b..3ebdac45389 100644 --- a/mozilla/docshell/base/nsDocShell.cpp +++ b/mozilla/docshell/base/nsDocShell.cpp @@ -4114,7 +4114,6 @@ nsDocShell::InternalLoad(nsIURI * aURI, PRUint32 aLoadType, nsISHEntry * aSHEntry) { - nsresult rv; nsCOMPtr owner(aOwner); @@ -4263,8 +4262,13 @@ nsDocShell::InternalLoad(nsIURI * aURI, return rv; } - - + // + // Load is being targetted at this docshell so return an error if the + // docshell is in the process of being destroyed. + // + if (mIsBeingDestroyed) { + return NS_ERROR_FAILURE; + } mURIResultedInDocument = PR_FALSE; // reset the clock... mLSHE = aSHEntry;