Currently, there are two bits that play into the decision of whether a process swap is needed for a navigation:
1. ShouldSwapProcessesForRedirect, which calls up to ChromeContentBrowserClientExtensionsPart and checks whether a process transfer is needed due to crossing extension process boundaries.
2. IsRendererTransferNeededForNavigation, which also calls up to ChromeContentBrowserClientExtensionsPart for DoesSiteRequireDedicatedProcess to check if a site requires a dedicated process.
NavigationHandleImpl::MaybeTransferAndProceedInternal will attempt a transfer if either one of these two functions indicates that a transfer is needed.
Having these two as separate paths is confusing, and has partly led to bugs such as issue 710668, where we excluded hosted apps from --isolate-extensions in ChromeContentBrowserClientExtensionsPart::DoesSiteRequireDedicatedProcess, but not in ShouldSwapProcessesForRedirect. This meant that subframe redirects to hosted apps attempted a transfer which was later cancelled in an obscure code path (which was broken in a fix for issue 681077 and subsequently fixed in issue 697513 ).
It'd be nice to merge these two paths to eliminate inconsistencies in decisions about what needs a process swap, and possibly to get rid of the fragile transfer-initially-but-then-cancel-later behavior described in https://crbug.com/697513#c1 .
Comment 1 by lukasza@chromium.org
, May 16 2017Status: Duplicate (was: Available)