Bug 1597154 - pt 1. Avoid redirecting loads between processes more than once r=mattwoodrow,kmag

This doesn't fix the bug, but it is a good idea.

Differential Revision: https://phabricator.services.mozilla.com/D57597
This commit is contained in:
Paul Bone
2020-01-16 03:52:01 +00:00
parent eba1dd051b
commit 3fb0a951c1

View File

@@ -8994,9 +8994,10 @@ nsresult nsDocShell::InternalLoad(nsDocShellLoadState* aLoadState,
}
// Check if the webbrowser chrome wants the load to proceed; this can be
// used to cancel attempts to load URIs in the wrong process.
// used to cancel attempts to load URIs in the wrong process. use
// GetPendingRedirectedChannel() to avoid revisiting a redirect decision.
nsCOMPtr<nsIWebBrowserChrome3> browserChrome3 = do_GetInterface(mTreeOwner);
if (browserChrome3) {
if (browserChrome3 && !aLoadState->GetPendingRedirectedChannel()) {
bool shouldLoad;
rv = browserChrome3->ShouldLoadURI(
this, aLoadState->URI(), aLoadState->GetReferrerInfo(),