From d9fb5d832d47308e5737276851367b8a4875e94d Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Thu, 22 Jan 2009 14:33:10 -0500 Subject: [PATCH] Bug 474349. Set mOSHE when starting load for document.write, since there will never be an Embed call, and do so in all cases, not just when we already have an mOSHE. r+sr=jst --- docshell/base/nsDocShell.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/docshell/base/nsDocShell.cpp b/docshell/base/nsDocShell.cpp index 97e5c050e311..6fe577d86840 100644 --- a/docshell/base/nsDocShell.cpp +++ b/docshell/base/nsDocShell.cpp @@ -5103,8 +5103,9 @@ nsDocShell::OnStateChange(nsIWebProgress * aProgress, nsIRequest * aRequest, SetCurrentURI(uri, aRequest, PR_TRUE); // Save history state of the previous page rv = PersistLayoutHistoryState(); - if (mOSHE) - SetHistoryEntry(&mOSHE, mLSHE); + // We'll never get an Embed() for this load, so just go ahead + // and SetHistoryEntry now. + SetHistoryEntry(&mOSHE, mLSHE); } }