mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 21:31:04 +00:00
If we run into a null child SHEntry while cloning, just clone it as null into
the new tree instead of bailing out on the clone altogether. Bug 275890, r=biesi, sr=darin
This commit is contained in:
parent
681fcfb1b7
commit
220748d802
@ -6582,11 +6582,14 @@ nsDocShell::CloneAndReplace(nsISHEntry * src, PRUint32 aCloneID,
|
||||
for (PRInt32 i = 0; i < childCount; i++) {
|
||||
nsCOMPtr<nsISHEntry> srcChild;
|
||||
srcContainer->GetChildAt(i, getter_AddRefs(srcChild));
|
||||
if (!srcChild)
|
||||
return NS_ERROR_FAILURE;
|
||||
if (!srcChild) {
|
||||
// srcChild can be null for valid reasons, for example if the
|
||||
// docshell at index i never loaded anything useful. So if we
|
||||
// hit a null here, just go on; it'll be null in the cloned
|
||||
// tree as well.
|
||||
continue;
|
||||
}
|
||||
nsCOMPtr<nsISHEntry> destChild;
|
||||
if (NS_FAILED(result))
|
||||
return result;
|
||||
result =
|
||||
CloneAndReplace(srcChild, aCloneID, replaceEntry,
|
||||
getter_AddRefs(destChild));
|
||||
|
Loading…
Reference in New Issue
Block a user