Clear the old child docshells when SetDOMDocument is called, so that they don't get persisted in session history before they're GC'd. Also, update SHEntry to hold strong references to the child docshells. Bug 319551, r=sicking sr=bzbarsky
git-svn-id: svn://10.0.0.236/trunk@200898 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
@@ -1476,6 +1476,19 @@ DocumentViewerImpl::Destroy()
|
||||
if (mPrintEngine->CheckBeforeDestroy()) {
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Clear the list of old child docshells. CChild docshells for the new
|
||||
// document will be constructed as frames are created.
|
||||
nsCOMPtr<nsIDocShellTreeNode> node = do_QueryInterface(container);
|
||||
if (node) {
|
||||
PRInt32 count;
|
||||
node->GetChildCount(&count);
|
||||
for (PRInt32 i = 0; i < count; ++i) {
|
||||
nsCOMPtr<nsIDocShellTreeItem> child;
|
||||
node->GetChildAt(0, getter_AddRefs(child));
|
||||
node->RemoveChild(child);
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user