Bug 430050, cancel frameloader initialization when docshell starts to load a page, r=sicking, sr=jst, a=dsicore

git-svn-id: svn://10.0.0.236/trunk@250752 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
Olli.Pettay%helsinki.fi
2008-04-24 10:33:24 +00:00
parent 9dff59505e
commit d9f6ce40c4
7 changed files with 93 additions and 11 deletions

View File

@@ -6884,6 +6884,18 @@ nsDocShell::InternalLoad(nsIURI * aURI,
return rv;
}
// If this docshell is owned by a frameloader, make sure to cancel
// possible frameloader initialization before loading a new page.
nsCOMPtr<nsIDocShellTreeItem> parent;
GetParent(getter_AddRefs(parent));
if (parent) {
nsCOMPtr<nsIDOMDocument> domDoc = do_GetInterface(parent);
nsCOMPtr<nsIDocument> doc = do_QueryInterface(domDoc);
if (doc) {
doc->TryCancelFrameLoaderInitialization(this);
}
}
if (mFiredUnloadEvent) {
if (IsOKToLoadURI(aURI)) {
NS_PRECONDITION(!aWindowTarget || !*aWindowTarget,