Skip to content

Commit

Permalink
Bug 1597154 - pt 1. Avoid redirecting loads between processes more th…
Browse files Browse the repository at this point in the history
…an once r=mattwoodrow,kmag

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

Differential Revision: https://phabricator.services.mozilla.com/D57597

--HG--
extra : moz-landing-system : lando
  • Loading branch information
PaulBone committed Feb 20, 2020
1 parent 8d915f1 commit 0048098
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions docshell/base/nsDocShell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8981,9 +8981,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(),
Expand Down

0 comments on commit 0048098

Please sign in to comment.