Bug 1650089 - Part 1: Add a remoteTypeOverride option for about:blank loads triggered by chrome, r=annyG,kmag
After the changes in this bug, about:blank loads triggered by chrome will finish in a "web" content process, as they have an untrusted null principal without a precursor. In a few places throughout the codebase, however, we perform about:blank loads with the explicit expectation that they do not change processes. This new remoteTypeOverride option allows the intended final process to be explicitly specified in this situation. For security & simplicity reasons, this new attribute is limited to only be usable on system-principal triggered loads of about:blank in toplevel browsing contexts. Differential Revision: https://phabricator.services.mozilla.com/D120671
This commit is contained in:
@@ -1493,8 +1493,14 @@ function _loadURI(browser, uri, params = {}) {
|
||||
uri = "about:blank";
|
||||
}
|
||||
|
||||
let { triggeringPrincipal, referrerInfo, postData, userContextId, csp } =
|
||||
params || {};
|
||||
let {
|
||||
triggeringPrincipal,
|
||||
referrerInfo,
|
||||
postData,
|
||||
userContextId,
|
||||
csp,
|
||||
remoteTypeOverride,
|
||||
} = params || {};
|
||||
let loadFlags =
|
||||
params.loadFlags || params.flags || Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||
let hasValidUserGestureActivation =
|
||||
@@ -1539,6 +1545,7 @@ function _loadURI(browser, uri, params = {}) {
|
||||
referrerInfo,
|
||||
postData,
|
||||
hasValidUserGestureActivation,
|
||||
remoteTypeOverride,
|
||||
};
|
||||
try {
|
||||
browser.webNavigation.loadURI(uri, loadURIOptions);
|
||||
|
||||
Reference in New Issue
Block a user