зеркало из https://github.com/mozilla/pjs.git
Abort restoring the presentation if firing pagehide/unload stopped the load. Bug 305995, r+sr=bzbarsky.
This commit is contained in:
Родитель
3550ff2508
Коммит
a794ca803a
|
@ -5187,8 +5187,18 @@ nsDocShell::RestoreFromHistory()
|
|||
if (oldMUDV && newMUDV)
|
||||
oldMUDV->GetTextZoom(&zoom);
|
||||
|
||||
// Protect against mLSHE going away via a load triggered from
|
||||
// pagehide or unload.
|
||||
nsCOMPtr<nsISHEntry> origLSHE = mLSHE;
|
||||
|
||||
// Notify the old content viewer that it's being hidden.
|
||||
FirePageHideNotification(!mSavingOldViewer);
|
||||
|
||||
// If mLSHE was changed as a result of the pagehide event, then
|
||||
// something else was loaded. Don't finish restoring.
|
||||
if (mLSHE != origLSHE)
|
||||
return NS_OK;
|
||||
|
||||
// Set mFiredUnloadEvent = PR_FALSE so that the unload handler for the
|
||||
// *new* document will fire.
|
||||
mFiredUnloadEvent = PR_FALSE;
|
||||
|
|
Загрузка…
Ссылка в новой задаче