Destroy content viewers in session history when destroying docshell, just like we destroy the current one. (Bug 488394) r+sr=bzbarsky
This commit is contained in:
Родитель
d718b83774
Коммит
69912fb1ac
|
@ -3849,7 +3849,18 @@ nsDocShell::Destroy()
|
|||
mScriptGlobal = nsnull;
|
||||
}
|
||||
|
||||
mSessionHistory = nsnull;
|
||||
if (mSessionHistory) {
|
||||
// We want to destroy these content viewers now rather than
|
||||
// letting their destruction wait for the session history
|
||||
// entries to get garbage collected. (Bug 488394)
|
||||
nsCOMPtr<nsISHistoryInternal> shPrivate =
|
||||
do_QueryInterface(mSessionHistory);
|
||||
if (shPrivate) {
|
||||
shPrivate->EvictAllContentViewers();
|
||||
}
|
||||
mSessionHistory = nsnull;
|
||||
}
|
||||
|
||||
SetTreeOwner(nsnull);
|
||||
|
||||
// required to break ref cycle
|
||||
|
|
Загрузка…
Ссылка в новой задаче