Make sure to properly set subframes loaded from bfcache as not having had
unload fired on them. Bug 364461, r=biesi, sr=jst. git-svn-id: svn://10.0.0.236/trunk@229717 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -5230,6 +5230,12 @@ nsDocShell::BeginRestore(nsIContentViewer *aContentViewer, PRBool aTop)
|
||||
}
|
||||
|
||||
if (!aTop) {
|
||||
// This point corresponds to us having gotten OnStartRequest or
|
||||
// STATE_START, so do the same thing that CreateContentViewer does at
|
||||
// this point to ensure that unload/pagehide events for this document
|
||||
// will fire when it's unloaded again.
|
||||
mFiredUnloadEvent = PR_FALSE;
|
||||
|
||||
// For non-top frames, there is no notion of making sure that the
|
||||
// previous document is in the domwindow when STATE_START notifications
|
||||
// happen. We can just call BeginRestore for all of the child shells
|
||||
@@ -6292,6 +6298,10 @@ nsDocShell::InternalLoad(nsIURI * aURI,
|
||||
nsIDocShell** aDocShell,
|
||||
nsIRequest** aRequest)
|
||||
{
|
||||
if (mFiredUnloadEvent) {
|
||||
return NS_OK; // JS may not handle returning of an error code
|
||||
}
|
||||
|
||||
nsresult rv = NS_OK;
|
||||
|
||||
#ifdef PR_LOGGING
|
||||
|
||||
Reference in New Issue
Block a user