Back out the additional patch for bug 305181 to fix bug 346259. r+sr=bryner

git-svn-id: svn://10.0.0.236/trunk@206108 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
bzbarsky%mit.edu
2006-07-31 04:04:16 +00:00
parent 3c5f5fb6cc
commit e87dae66f8
2 changed files with 0 additions and 41 deletions

View File

@@ -2466,37 +2466,6 @@ nsDocShell::AddChild(nsIDocShellTreeItem * aChild)
return NS_OK;
}
/* static */ void
nsDocShell::RemoveChildsSHEntriesFrom(nsISHEntry *aParentEntry,
nsDocShell *aChildShell)
{
NS_PRECONDITION(aChildShell, "Must have child shell!");
nsCOMPtr<nsISHContainer> container(do_QueryInterface(aParentEntry));
if (!container)
return;
PRInt32 childCount;
container->GetChildCount(&childCount);
// Iterate backwards so removals are ok
for (PRInt32 i = childCount - 1; i >= 0; --i) {
nsCOMPtr<nsISHEntry> childEntry;
container->GetChildAt(i, getter_AddRefs(childEntry));
if (!childEntry) {
// childEntry can be null for valid reasons, for example if the
// docshell at index i never loaded anything useful.
continue;
}
if (!aChildShell->HasHistoryEntry(childEntry)) {
// Not an SHEntry for aChildShell
continue;
}
container->RemoveChild(childEntry);
}
}
NS_IMETHODIMP
nsDocShell::RemoveChild(nsIDocShellTreeItem * aChild)
{
@@ -2510,11 +2479,6 @@ nsDocShell::RemoveChild(nsIDocShellTreeItem * aChild)
aChild->SetTreeOwner(nsnull);
// Make sure to remove the child's SHEntry from our SHEntry's child list
nsDocShell* childAsDocshell = NS_STATIC_CAST(nsDocShell*, aChild);
RemoveChildsSHEntriesFrom(mOSHE, childAsDocshell);
RemoveChildsSHEntriesFrom(mLSHE, childAsDocshell);
return nsDocLoader::AddDocLoaderAsChildOfRoot(childAsDocLoader);
}