Bug 1625513 - Part 1: Perform onMayChangeProcess handling within DocumentLoadListener, r=mattwoodrow,pbone,droeh,necko-reviewers,valentin
When I first added this method last year, I added it in JS, handled from within SessionStore.jsm, as that was the easiest place to do it. Now that DocumentLoadListener exists, it makes more sense to handle this logic directly from within that code. Many parts of the process switch are still handled by frontend JS, such as selecting remote types, and performing toplevel process switches. Differential Revision: https://phabricator.services.mozilla.com/D68594
This commit is contained in:
@@ -2052,6 +2052,41 @@
|
||||
}
|
||||
return origins;
|
||||
}
|
||||
|
||||
get canPerformProcessSwitch() {
|
||||
return this.getTabBrowser() != null;
|
||||
}
|
||||
|
||||
performProcessSwitch(
|
||||
remoteType,
|
||||
redirectLoadSwitchId,
|
||||
replaceBrowsingContext
|
||||
) {
|
||||
return this.getTabBrowser().performProcessSwitch(
|
||||
this,
|
||||
remoteType,
|
||||
redirectLoadSwitchId,
|
||||
replaceBrowsingContext
|
||||
);
|
||||
}
|
||||
|
||||
getRemoteTypeForPrincipal(
|
||||
principal,
|
||||
remoteTabs,
|
||||
remoteSubframes,
|
||||
preferredRemoteType,
|
||||
currentPrincipal,
|
||||
isSubframe
|
||||
) {
|
||||
return E10SUtils.getRemoteTypeForPrincipal(
|
||||
principal,
|
||||
remoteTabs,
|
||||
remoteSubframes,
|
||||
preferredRemoteType,
|
||||
currentPrincipal,
|
||||
isSubframe
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
MozXULElement.implementCustomInterface(MozBrowser, [Ci.nsIBrowser]);
|
||||
|
||||
Reference in New Issue
Block a user