Fix for bug 633738 (quora.com bloats out of control (part 3)) - keep editor alive when navigating back. r=bz, a=jst.

This commit is contained in:
Peter Van der Beken 2011-02-16 13:07:48 +01:00
parent d78216fbaf
commit 85288fe219

View File

@ -7128,10 +7128,16 @@ nsDocShell::RestoreFromHistory()
// Reattach to the window object.
rv = mContentViewer->Open(windowState, mLSHE);
// Hack to keep nsDocShellEditorData alive across the
// SetContentViewer(nsnull) call below.
nsAutoPtr<nsDocShellEditorData> data(mLSHE->ForgetEditorData());
// Now remove it from the cached presentation.
mLSHE->SetContentViewer(nsnull);
mEODForCurrentDocument = PR_FALSE;
mLSHE->SetEditorData(data.forget());
#ifdef DEBUG
{
nsCOMPtr<nsISupportsArray> refreshURIs;