mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-12 04:45:45 +00:00
Diverting window.open into a tab doesn't stop the about:blank load before
returning the new window. Bug 348272, r=bsmedberg, sr=jst
This commit is contained in:
parent
63b7133e98
commit
ac4a87c1ae
@ -595,6 +595,15 @@ nsWindowWatcher::OpenWindowJSInternal(nsIDOMWindow *aParent,
|
||||
getter_AddRefs(newWindow));
|
||||
if (NS_SUCCEEDED(rv)) {
|
||||
GetWindowTreeItem(newWindow, getter_AddRefs(newDocShellItem));
|
||||
if (windowIsNew && newDocShellItem) {
|
||||
// Make sure to stop any loads happening in this window that the
|
||||
// window provider might have started. Otherwise if our caller
|
||||
// manipulates the window it just opened and then the load
|
||||
// completes their stuff will get blown away.
|
||||
nsCOMPtr<nsIWebNavigation> webNav =
|
||||
do_QueryInterface(newDocShellItem);
|
||||
webNav->Stop(nsIWebNavigation::STOP_NETWORK);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user