Bug 1513241: Update frontend consumers of loadURI and pass loadURIOptions dictionary. r=gijs
This commit is contained in:
@@ -1063,6 +1063,13 @@ function _loadURI(browser, uri, params = {}) {
|
|||||||
if (!requiredRemoteType) {
|
if (!requiredRemoteType) {
|
||||||
browser.inLoadURI = true;
|
browser.inLoadURI = true;
|
||||||
}
|
}
|
||||||
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal,
|
||||||
|
loadFlags: flags,
|
||||||
|
referrerURI,
|
||||||
|
referrerPolicy,
|
||||||
|
postData,
|
||||||
|
};
|
||||||
try {
|
try {
|
||||||
if (!mustChangeProcess) {
|
if (!mustChangeProcess) {
|
||||||
if (userContextId) {
|
if (userContextId) {
|
||||||
@@ -1071,10 +1078,7 @@ function _loadURI(browser, uri, params = {}) {
|
|||||||
privateBrowsingId: PrivateBrowsingUtils.isBrowserPrivate(browser) ? 1 : 0,
|
privateBrowsingId: PrivateBrowsingUtils.isBrowserPrivate(browser) ? 1 : 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
browser.webNavigation.loadURI(uri, loadURIOptions);
|
||||||
browser.webNavigation.loadURIWithOptions(uri, flags,
|
|
||||||
referrerURI, referrerPolicy,
|
|
||||||
postData, null, null, triggeringPrincipal);
|
|
||||||
} else {
|
} else {
|
||||||
// Check if the current browser is allowed to unload.
|
// Check if the current browser is allowed to unload.
|
||||||
let {permitUnload, timedOut} = browser.permitUnload();
|
let {permitUnload, timedOut} = browser.permitUnload();
|
||||||
@@ -1121,9 +1125,7 @@ function _loadURI(browser, uri, params = {}) {
|
|||||||
privateBrowsingId: PrivateBrowsingUtils.isBrowserPrivate(browser) ? 1 : 0,
|
privateBrowsingId: PrivateBrowsingUtils.isBrowserPrivate(browser) ? 1 : 0,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
browser.webNavigation.loadURI(uri, loadURIOptions);
|
||||||
browser.webNavigation.loadURIWithOptions(uri, flags, referrerURI, referrerPolicy,
|
|
||||||
postData, null, null, triggeringPrincipal);
|
|
||||||
} else {
|
} else {
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,9 +63,10 @@ function clear_history() {
|
|||||||
var waitForLoad = async function(uri) {
|
var waitForLoad = async function(uri) {
|
||||||
info("Loading " + uri);
|
info("Loading " + uri);
|
||||||
// Longwinded but this ensures we don't just shortcut to LoadInNewProcess
|
// Longwinded but this ensures we don't just shortcut to LoadInNewProcess
|
||||||
gBrowser.selectedBrowser.webNavigation.loadURI(uri, Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
let loadURIOptions = {
|
||||||
null, null, null,
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
Services.scriptSecurityManager.getSystemPrincipal());
|
};
|
||||||
|
gBrowser.selectedBrowser.webNavigation.loadURI(uri, loadURIOptions);
|
||||||
|
|
||||||
await BrowserTestUtils.browserStopped(gBrowser);
|
await BrowserTestUtils.browserStopped(gBrowser);
|
||||||
gExpectedHistory.index++;
|
gExpectedHistory.index++;
|
||||||
|
|||||||
@@ -204,19 +204,24 @@ ContentRestoreInternal.prototype = {
|
|||||||
if (loadArguments.userContextId) {
|
if (loadArguments.userContextId) {
|
||||||
webNavigation.setOriginAttributesBeforeLoading({ userContextId: loadArguments.userContextId });
|
webNavigation.setOriginAttributesBeforeLoading({ userContextId: loadArguments.userContextId });
|
||||||
}
|
}
|
||||||
|
let loadURIOptions = {
|
||||||
webNavigation.loadURIWithOptions(loadArguments.uri, loadArguments.flags,
|
triggeringPrincipal,
|
||||||
referrer, referrerPolicy, postData,
|
loadFlags: loadArguments.flags,
|
||||||
null, null, triggeringPrincipal);
|
referrerURI: referrer,
|
||||||
|
referrerPolicy,
|
||||||
|
postData,
|
||||||
|
};
|
||||||
|
webNavigation.loadURI(loadArguments.uri, loadURIOptions);
|
||||||
} else if (tabData.userTypedValue && tabData.userTypedClear) {
|
} else if (tabData.userTypedValue && tabData.userTypedClear) {
|
||||||
// If the user typed a URL into the URL bar and hit enter right before
|
// If the user typed a URL into the URL bar and hit enter right before
|
||||||
// we crashed, we want to start loading that page again. A non-zero
|
// we crashed, we want to start loading that page again. A non-zero
|
||||||
// userTypedClear value means that the load had started.
|
// userTypedClear value means that the load had started.
|
||||||
// Load userTypedValue and fix up the URL if it's partial/broken.
|
// Load userTypedValue and fix up the URL if it's partial/broken.
|
||||||
webNavigation.loadURI(tabData.userTypedValue,
|
let loadURIOptions = {
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP,
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
null, null, null,
|
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP,
|
||||||
Services.scriptSecurityManager.getSystemPrincipal());
|
};
|
||||||
|
webNavigation.loadURI(tabData.userTypedValue, loadURIOptions);
|
||||||
} else if (tabData.entries.length) {
|
} else if (tabData.entries.length) {
|
||||||
// Stash away the data we need for restoreDocument.
|
// Stash away the data we need for restoreDocument.
|
||||||
let activeIndex = tabData.index - 1;
|
let activeIndex = tabData.index - 1;
|
||||||
@@ -230,10 +235,11 @@ ContentRestoreInternal.prototype = {
|
|||||||
history.reloadCurrentEntry();
|
history.reloadCurrentEntry();
|
||||||
} else {
|
} else {
|
||||||
// If there's nothing to restore, we should still blank the page.
|
// If there's nothing to restore, we should still blank the page.
|
||||||
webNavigation.loadURI("about:blank",
|
let loadURIOptions = {
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY,
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
null, null, null,
|
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY,
|
||||||
Services.scriptSecurityManager.getSystemPrincipal());
|
};
|
||||||
|
webNavigation.loadURI("about:blank", loadURIOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
@@ -377,9 +383,11 @@ HistoryListener.prototype = {
|
|||||||
// STATE_START notification to be sent and the ProgressListener will then
|
// STATE_START notification to be sent and the ProgressListener will then
|
||||||
// notify the parent and do the rest.
|
// notify the parent and do the rest.
|
||||||
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
|
let flags = Ci.nsIWebNavigation.LOAD_FLAGS_ALLOW_THIRD_PARTY_FIXUP;
|
||||||
this.webNavigation.loadURI(newURI.spec, flags,
|
let loadURIOptions = {
|
||||||
null, null, null,
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
Services.scriptSecurityManager.getSystemPrincipal());
|
loadFlags: flags,
|
||||||
|
};
|
||||||
|
this.webNavigation.loadURI(newURI.spec, loadURIOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
OnHistoryReload(reloadURI, reloadFlags) {
|
OnHistoryReload(reloadURI, reloadFlags) {
|
||||||
|
|||||||
@@ -117,8 +117,7 @@ add_task(async function save_worthy_tabs_remote_final() {
|
|||||||
|
|
||||||
// Replace about:blank with a new remote page.
|
// Replace about:blank with a new remote page.
|
||||||
let snippet = 'webNavigation.loadURI("https://example.com/",\
|
let snippet = 'webNavigation.loadURI("https://example.com/",\
|
||||||
null, null, null, null,\
|
{triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal()})';
|
||||||
Services.scriptSecurityManager.getSystemPrincipal())';
|
|
||||||
await promiseNewLocationAndHistoryEntryReplaced(browser, snippet);
|
await promiseNewLocationAndHistoryEntryReplaced(browser, snippet);
|
||||||
|
|
||||||
// Remotness shouldn't have changed.
|
// Remotness shouldn't have changed.
|
||||||
|
|||||||
@@ -43,8 +43,10 @@ add_task(async function contentToChromeNavigate() {
|
|||||||
await ContentTask.spawn(tab.linkedBrowser, null, function() {
|
await ContentTask.spawn(tab.linkedBrowser, null, function() {
|
||||||
const CHROME_URL = "about:config";
|
const CHROME_URL = "about:config";
|
||||||
let webnav = content.window.getInterface(Ci.nsIWebNavigation);
|
let webnav = content.window.getInterface(Ci.nsIWebNavigation);
|
||||||
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let loadURIOptions = {
|
||||||
webnav.loadURI(CHROME_URL, Ci.nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null, systemPrincipal);
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
};
|
||||||
|
webnav.loadURI(CHROME_URL, loadURIOptions);
|
||||||
});
|
});
|
||||||
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
await BrowserTestUtils.browserLoaded(tab.linkedBrowser);
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,10 @@ const progressListeners = new Map();
|
|||||||
|
|
||||||
function loadContentWindow(webNavigation, uri, principal) {
|
function loadContentWindow(webNavigation, uri, principal) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
webNavigation.loadURI(uri, Ci.nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null, principal);
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: principal,
|
||||||
|
};
|
||||||
|
webNavigation.loadURI(uri, loadURIOptions);
|
||||||
let docShell = webNavigation.QueryInterface(Ci.nsIInterfaceRequestor)
|
let docShell = webNavigation.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIDocShell);
|
.getInterface(Ci.nsIDocShell);
|
||||||
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
|
|||||||
@@ -130,9 +130,12 @@ this.tabExtras = class extends ExtensionAPI {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
windowTracker.addListener("progress", listener);
|
windowTracker.addListener("progress", listener);
|
||||||
let triggeringPrincipal = Services.scriptSecurityManager.createNullPrincipal({});
|
|
||||||
tab.browser.webNavigation.loadURIWithOptions(url, null, null, null,
|
let loadURIOptions = {
|
||||||
post, null, null, triggeringPrincipal);
|
triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({}),
|
||||||
|
postData: post,
|
||||||
|
};
|
||||||
|
tab.browser.webNavigation.loadURI(url, loadURIOptions);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async getWebcompatInfo(tabId) {
|
async getWebcompatInfo(tabId) {
|
||||||
|
|||||||
@@ -34,8 +34,10 @@ add_task(async function() {
|
|||||||
equal(loadContext.usePrivateBrowsing, false,
|
equal(loadContext.usePrivateBrowsing, false,
|
||||||
"Should be able to change origin attributes prior to a document load");
|
"Should be able to change origin attributes prior to a document load");
|
||||||
|
|
||||||
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let loadURIOptions = {
|
||||||
webNav.loadURI("data:text/html,", webNav.LOAD_FLAGS_NONE, null, null, null, systemPrincipal);
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
};
|
||||||
|
webNav.loadURI("data:text/html,", loadURIOptions);
|
||||||
|
|
||||||
// Return to the event loop so the load can begin.
|
// Return to the event loop so the load can begin.
|
||||||
await new Promise(executeSoon);
|
await new Promise(executeSoon);
|
||||||
|
|||||||
@@ -18,8 +18,10 @@ add_task(async function test_windowlessBrowserTroubleshootCrash() {
|
|||||||
};
|
};
|
||||||
Services.obs.addObserver(listener, "content-document-global-created");
|
Services.obs.addObserver(listener, "content-document-global-created");
|
||||||
});
|
});
|
||||||
let triggeringPrincipal = Services.scriptSecurityManager.createNullPrincipal({});
|
let loadURIOptions = {
|
||||||
webNav.loadURI("about:blank", 0, null, null, null, triggeringPrincipal);
|
triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal({}),
|
||||||
|
};
|
||||||
|
webNav.loadURI("about:blank", loadURIOptions);
|
||||||
|
|
||||||
await onLoaded;
|
await onLoaded;
|
||||||
|
|
||||||
|
|||||||
@@ -1080,9 +1080,10 @@ function DoAssertionCheck()
|
|||||||
|
|
||||||
function LoadURI(uri)
|
function LoadURI(uri)
|
||||||
{
|
{
|
||||||
var flags = webNavigation().LOAD_FLAGS_NONE;
|
let loadURIOptions = {
|
||||||
var systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
webNavigation().loadURI(uri, flags, null, null, null, systemPrincipal);
|
};
|
||||||
|
webNavigation().loadURI(uri, loadURIOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
function LogWarning(str)
|
function LogWarning(str)
|
||||||
|
|||||||
@@ -101,14 +101,22 @@ var wrapper = {
|
|||||||
// Set the iframe's location with loadURI/LOAD_FLAGS_BYPASS_HISTORY to
|
// Set the iframe's location with loadURI/LOAD_FLAGS_BYPASS_HISTORY to
|
||||||
// avoid having a new history entry being added.
|
// avoid having a new history entry being added.
|
||||||
let webNav = iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
|
let webNav = iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
|
||||||
webNav.loadURI(url, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null);
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY,
|
||||||
|
};
|
||||||
|
webNav.loadURI(url, loadURIOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
retry: function() {
|
retry: function() {
|
||||||
deferTransitionToRemoteAfterLoaded();
|
deferTransitionToRemoteAfterLoaded();
|
||||||
|
|
||||||
let webNav = this.iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
|
let webNav = this.iframe.frameLoader.docShell.QueryInterface(Ci.nsIWebNavigation);
|
||||||
webNav.loadURI(this.url, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY, null, null, null);
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY,
|
||||||
|
};
|
||||||
|
webNav.loadURI(this.url, loadURIOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
iframeListener: {
|
iframeListener: {
|
||||||
|
|||||||
@@ -3904,8 +3904,11 @@ Tab.prototype = {
|
|||||||
// We were redirected; reload the original URL
|
// We were redirected; reload the original URL
|
||||||
url = this.originalURI.spec;
|
url = this.originalURI.spec;
|
||||||
}
|
}
|
||||||
|
let loadURIOptions = {
|
||||||
this.browser.docShell.loadURI(url, flags, null, null, null, this.browser.contentPrincipal);
|
triggeringPrincipal: this.browser.contentPrincipal,
|
||||||
|
loadFlags: flags,
|
||||||
|
};
|
||||||
|
this.browser.docShell.loadURI(url, loadURIOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
destroy: function() {
|
destroy: function() {
|
||||||
@@ -5079,8 +5082,11 @@ var ErrorPageEventHandler = {
|
|||||||
attrs["privateBrowsingId"] = 1;
|
attrs["privateBrowsingId"] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
let triggeringPrincipal = nullServices.scriptSecurityManager.createNullPrincipal(attrs);
|
let loadURIOptions = {
|
||||||
webNav.loadURI(location, Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER, null, null, triggeringPrincipal);
|
triggeringPrincipal: Services.scriptSecurityManager.createNullPrincipal(attrs),
|
||||||
|
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_CLASSIFIER,
|
||||||
|
};
|
||||||
|
webNav.loadURI(location, loadURIOptions);
|
||||||
|
|
||||||
// ....but add a notify bar as a reminder, so that they don't lose
|
// ....but add a notify bar as a reminder, so that they don't lose
|
||||||
// track after, e.g., tab switching.
|
// track after, e.g., tab switching.
|
||||||
|
|||||||
@@ -164,8 +164,11 @@ this.tabExtras = class extends ExtensionAPI {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
windowTracker.addListener("progress", listener);
|
windowTracker.addListener("progress", listener);
|
||||||
tab.browser.webNavigation.loadURIWithOptions(url, null, null, null,
|
let loadURIOptions = {
|
||||||
post, null, null, null);
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
postData: post,
|
||||||
|
};
|
||||||
|
tab.browser.webNavigation.loadURI(url, loadURIOptions);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async getWebcompatInfo(tabId) {
|
async getWebcompatInfo(tabId) {
|
||||||
|
|||||||
@@ -88,8 +88,10 @@ function testInit() {
|
|||||||
// eslint-disable-next-line no-undef
|
// eslint-disable-next-line no-undef
|
||||||
var webNav = content.window.docShell
|
var webNav = content.window.docShell
|
||||||
.QueryInterface(Ci.nsIWebNavigation);
|
.QueryInterface(Ci.nsIWebNavigation);
|
||||||
var systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let loadURIOptions = {
|
||||||
webNav.loadURI(url, null, null, null, null, systemPrincipal);
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
};
|
||||||
|
webNav.loadURI(url, loadURIOptions);
|
||||||
};
|
};
|
||||||
|
|
||||||
var listener = 'data:,function doLoad(e) { var data=e.detail&&e.detail.data;removeEventListener("contentEvent", function (e) { doLoad(e); }, false, true);sendAsyncMessage("chromeEvent", {"data":data}); };addEventListener("contentEvent", function (e) { doLoad(e); }, false, true);';
|
var listener = 'data:,function doLoad(e) { var data=e.detail&&e.detail.data;removeEventListener("contentEvent", function (e) { doLoad(e); }, false, true);sendAsyncMessage("chromeEvent", {"data":data}); };addEventListener("contentEvent", function (e) { doLoad(e); }, false, true);';
|
||||||
|
|||||||
@@ -110,9 +110,17 @@ class WebNavigationChild extends ActorChild {
|
|||||||
if (!triggeringPrincipal) {
|
if (!triggeringPrincipal) {
|
||||||
triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal({});
|
triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal({});
|
||||||
}
|
}
|
||||||
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal,
|
||||||
|
loadFlags: flags,
|
||||||
|
referrerURI: referrer,
|
||||||
|
referrerPolicy,
|
||||||
|
postData,
|
||||||
|
headers,
|
||||||
|
baseURI,
|
||||||
|
};
|
||||||
this._wrapURIChangeCall(() => {
|
this._wrapURIChangeCall(() => {
|
||||||
return this.webNavigation.loadURIWithOptions(uri, flags, referrer, referrerPolicy,
|
return this.webNavigation.loadURI(uri, loadURIOptions);
|
||||||
postData, headers, baseURI, triggeringPrincipal);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1114,7 +1114,10 @@ class HiddenXULWindow {
|
|||||||
let system = Services.scriptSecurityManager.getSystemPrincipal();
|
let system = Services.scriptSecurityManager.getSystemPrincipal();
|
||||||
this.chromeShell.createAboutBlankContentViewer(system);
|
this.chromeShell.createAboutBlankContentViewer(system);
|
||||||
this.chromeShell.useGlobalHistory = false;
|
this.chromeShell.useGlobalHistory = false;
|
||||||
this.chromeShell.loadURI("chrome://extensions/content/dummy.xul", 0, null, null, null, system);
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: system,
|
||||||
|
};
|
||||||
|
this.chromeShell.loadURI("chrome://extensions/content/dummy.xul", loadURIOptions);
|
||||||
|
|
||||||
await promiseObserved("chrome-document-global-created",
|
await promiseObserved("chrome-document-global-created",
|
||||||
win => win.document == this.chromeShell.document);
|
win => win.document == this.chromeShell.document);
|
||||||
|
|||||||
@@ -138,7 +138,10 @@ class ContentPage {
|
|||||||
|
|
||||||
chromeShell.createAboutBlankContentViewer(system);
|
chromeShell.createAboutBlankContentViewer(system);
|
||||||
chromeShell.useGlobalHistory = false;
|
chromeShell.useGlobalHistory = false;
|
||||||
chromeShell.loadURI("chrome://extensions/content/dummy.xul", 0, null, null, null, system);
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: system,
|
||||||
|
};
|
||||||
|
chromeShell.loadURI("chrome://extensions/content/dummy.xul", loadURIOptions);
|
||||||
|
|
||||||
await promiseObserved("chrome-document-global-created",
|
await promiseObserved("chrome-document-global-created",
|
||||||
win => win.document == chromeShell.document);
|
win => win.document == chromeShell.document);
|
||||||
|
|||||||
@@ -69,8 +69,10 @@ async function loadURL(url, {frameCount}) {
|
|||||||
Services.obs.addObserver(loadObserver, "content-document-global-created");
|
Services.obs.addObserver(loadObserver, "content-document-global-created");
|
||||||
|
|
||||||
let webNav = Services.appShell.createWindowlessBrowser(false);
|
let webNav = Services.appShell.createWindowlessBrowser(false);
|
||||||
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let loadURIOptions = {
|
||||||
webNav.loadURI(url, 0, null, null, null, systemPrincipal);
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
};
|
||||||
|
webNav.loadURI(url, loadURIOptions);
|
||||||
|
|
||||||
await loadPromise;
|
await loadPromise;
|
||||||
|
|
||||||
|
|||||||
@@ -14,11 +14,10 @@ const gfxFrameScript = {
|
|||||||
|
|
||||||
this.domUtils = content.windowUtils;
|
this.domUtils = content.windowUtils;
|
||||||
|
|
||||||
let triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let loadURIOptions = {
|
||||||
webNav.loadURI("chrome://gfxsanity/content/sanitytest.html",
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
};
|
||||||
null, null, null, triggeringPrincipal);
|
webNav.loadURI("chrome://gfxsanity/content/sanitytest.html", loadURIOptions);
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleEvent(aEvent) {
|
handleEvent(aEvent) {
|
||||||
|
|||||||
@@ -100,7 +100,12 @@ var ReaderMode = {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let flags = webNav.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
|
let flags = webNav.LOAD_FLAGS_DISALLOW_INHERIT_PRINCIPAL;
|
||||||
webNav.loadURI(originalURL, flags, referrerURI, null, null, principal);
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: principal,
|
||||||
|
loadFlags: flags,
|
||||||
|
referrerURI,
|
||||||
|
};
|
||||||
|
webNav.loadURI(originalURL, loadURIOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -65,15 +65,7 @@ RemoteWebNavigation.prototype = {
|
|||||||
gotoIndex(aIndex) {
|
gotoIndex(aIndex) {
|
||||||
this._sendMessage("WebNavigation:GotoIndex", {index: aIndex});
|
this._sendMessage("WebNavigation:GotoIndex", {index: aIndex});
|
||||||
},
|
},
|
||||||
loadURI(aURI, aLoadFlags, aReferrer, aPostData, aHeaders,
|
loadURI(aURI, aLoadURIOptions) {
|
||||||
aTriggeringPrincipal) {
|
|
||||||
this.loadURIWithOptions(aURI, aLoadFlags, aReferrer,
|
|
||||||
Ci.nsIHttpChannel.REFERRER_POLICY_UNSET,
|
|
||||||
aPostData, aHeaders, null,
|
|
||||||
aTriggeringPrincipal);
|
|
||||||
},
|
|
||||||
loadURIWithOptions(aURI, aLoadFlags, aReferrer, aReferrerPolicy,
|
|
||||||
aPostData, aHeaders, aBaseURI, aTriggeringPrincipal) {
|
|
||||||
// We know the url is going to be loaded, let's start requesting network
|
// We know the url is going to be loaded, let's start requesting network
|
||||||
// connection before the content process asks.
|
// connection before the content process asks.
|
||||||
// Note that we might have already setup the speculative connection in some
|
// Note that we might have already setup the speculative connection in some
|
||||||
@@ -81,8 +73,8 @@ RemoteWebNavigation.prototype = {
|
|||||||
if (aURI.startsWith("http:") || aURI.startsWith("https:")) {
|
if (aURI.startsWith("http:") || aURI.startsWith("https:")) {
|
||||||
try {
|
try {
|
||||||
let uri = makeURI(aURI);
|
let uri = makeURI(aURI);
|
||||||
let principal = aTriggeringPrincipal;
|
let principal = aLoadURIOptions.triggeringPrincipal;
|
||||||
// We usually have a aTriggeringPrincipal assigned, but in case we
|
// We usually have a triggeringPrincipal assigned, but in case we
|
||||||
// don't have one or if it's a SystemPrincipal, let's create it with OA
|
// don't have one or if it's a SystemPrincipal, let's create it with OA
|
||||||
// inferred from the current context.
|
// inferred from the current context.
|
||||||
if (!principal || principal.isSystemPrincipal) {
|
if (!principal || principal.isSystemPrincipal) {
|
||||||
@@ -101,14 +93,14 @@ RemoteWebNavigation.prototype = {
|
|||||||
|
|
||||||
this._sendMessage("WebNavigation:LoadURI", {
|
this._sendMessage("WebNavigation:LoadURI", {
|
||||||
uri: aURI,
|
uri: aURI,
|
||||||
flags: aLoadFlags,
|
flags: aLoadURIOptions.loadFlags,
|
||||||
referrer: aReferrer ? aReferrer.spec : null,
|
referrer: aLoadURIOptions.referrerURI ? aLoadURIOptions.referrerURI.spec : null,
|
||||||
referrerPolicy: aReferrerPolicy,
|
referrerPolicy: aLoadURIOptions.referrerPolicy,
|
||||||
postData: aPostData ? Utils.serializeInputStream(aPostData) : null,
|
postData: aLoadURIOptions.postData ? Utils.serializeInputStream(aLoadURIOptions.postData) : null,
|
||||||
headers: aHeaders ? Utils.serializeInputStream(aHeaders) : null,
|
headers: aLoadURIOptions.headers ? Utils.serializeInputStream(aLoadURIOptions.headers) : null,
|
||||||
baseURI: aBaseURI ? aBaseURI.spec : null,
|
baseURI: aLoadURIOptions.baseURI ? aLoadURIOptions.baseURI.spec : null,
|
||||||
triggeringPrincipal: Utils.serializePrincipal(
|
triggeringPrincipal: Utils.serializePrincipal(
|
||||||
aTriggeringPrincipal || Services.scriptSecurityManager.createNullPrincipal({})),
|
aLoadURIOptions.triggeringPrincipal || Services.scriptSecurityManager.createNullPrincipal({})),
|
||||||
requestTime: Services.telemetry.msSystemNow(),
|
requestTime: Services.telemetry.msSystemNow(),
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@@ -138,8 +130,10 @@ RemoteWebNavigation.prototype = {
|
|||||||
},
|
},
|
||||||
set currentURI(aURI) {
|
set currentURI(aURI) {
|
||||||
// Bug 1498600 verify usages of systemPrincipal here
|
// Bug 1498600 verify usages of systemPrincipal here
|
||||||
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let loadURIOptions = {
|
||||||
this.loadURI(aURI.spec, null, null, null, systemPrincipal);
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
};
|
||||||
|
this.loadURI(aURI.spec, loadURIOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
referringURI: null,
|
referringURI: null,
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ ChromeUtils.import("resource://gre/modules/Services.jsm");
|
|||||||
const SYSTEMPRINCIPAL = Services.scriptSecurityManager.getSystemPrincipal();
|
const SYSTEMPRINCIPAL = Services.scriptSecurityManager.getSystemPrincipal();
|
||||||
const DUMMY1 = "http://example.com/browser/toolkit/modules/tests/browser/dummy_page.html";
|
const DUMMY1 = "http://example.com/browser/toolkit/modules/tests/browser/dummy_page.html";
|
||||||
const DUMMY2 = "http://example.org/browser/toolkit/modules/tests/browser/dummy_page.html";
|
const DUMMY2 = "http://example.org/browser/toolkit/modules/tests/browser/dummy_page.html";
|
||||||
|
const LOAD_URI_OPTIONS = {triggeringPrincipal: SYSTEMPRINCIPAL};
|
||||||
|
|
||||||
function waitForLoad(uri) {
|
function waitForLoad(uri) {
|
||||||
return BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, uri);
|
return BrowserTestUtils.browserLoaded(gBrowser.selectedBrowser, false, uri);
|
||||||
@@ -15,11 +16,11 @@ function waitForPageShow(browser = gBrowser.selectedBrowser) {
|
|||||||
add_task(async function test_referrer() {
|
add_task(async function test_referrer() {
|
||||||
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
||||||
let browser = gBrowser.selectedBrowser;
|
let browser = gBrowser.selectedBrowser;
|
||||||
|
let loadURIOptionsWithReferrer = {
|
||||||
browser.webNavigation.loadURI(DUMMY1,
|
triggeringPrincipal: SYSTEMPRINCIPAL,
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
referrerURI: Services.io.newURI(DUMMY2),
|
||||||
Services.io.newURI(DUMMY2), null, null,
|
};
|
||||||
SYSTEMPRINCIPAL);
|
browser.webNavigation.loadURI(DUMMY1, loadURIOptionsWithReferrer);
|
||||||
await waitForLoad(DUMMY1);
|
await waitForLoad(DUMMY1);
|
||||||
|
|
||||||
await ContentTask.spawn(browser, [ DUMMY1, DUMMY2 ], function([dummy1, dummy2]) {
|
await ContentTask.spawn(browser, [ DUMMY1, DUMMY2 ], function([dummy1, dummy2]) {
|
||||||
@@ -42,16 +43,10 @@ add_task(async function test_history() {
|
|||||||
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
||||||
let browser = gBrowser.selectedBrowser;
|
let browser = gBrowser.selectedBrowser;
|
||||||
|
|
||||||
browser.webNavigation.loadURI(DUMMY1,
|
browser.webNavigation.loadURI(DUMMY1, LOAD_URI_OPTIONS);
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
|
||||||
null, null, null,
|
|
||||||
SYSTEMPRINCIPAL);
|
|
||||||
await waitForLoad(DUMMY1);
|
await waitForLoad(DUMMY1);
|
||||||
|
|
||||||
browser.webNavigation.loadURI(DUMMY2,
|
browser.webNavigation.loadURI(DUMMY2, LOAD_URI_OPTIONS);
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
|
||||||
null, null, null,
|
|
||||||
SYSTEMPRINCIPAL);
|
|
||||||
await waitForLoad(DUMMY2);
|
await waitForLoad(DUMMY2);
|
||||||
|
|
||||||
await ContentTask.spawn(browser, [DUMMY1, DUMMY2], function([dummy1, dummy2]) {
|
await ContentTask.spawn(browser, [DUMMY1, DUMMY2], function([dummy1, dummy2]) {
|
||||||
@@ -100,23 +95,20 @@ add_task(async function test_flags() {
|
|||||||
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
gBrowser.selectedTab = BrowserTestUtils.addTab(gBrowser);
|
||||||
let browser = gBrowser.selectedBrowser;
|
let browser = gBrowser.selectedBrowser;
|
||||||
|
|
||||||
browser.webNavigation.loadURI(DUMMY1,
|
browser.webNavigation.loadURI(DUMMY1, LOAD_URI_OPTIONS);
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
|
||||||
null, null, null,
|
|
||||||
SYSTEMPRINCIPAL);
|
|
||||||
await waitForLoad(DUMMY1);
|
await waitForLoad(DUMMY1);
|
||||||
|
let loadURIOptionsReplaceHistory = {
|
||||||
browser.webNavigation.loadURI(DUMMY2,
|
triggeringPrincipal: SYSTEMPRINCIPAL,
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY,
|
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_REPLACE_HISTORY,
|
||||||
null, null, null,
|
};
|
||||||
SYSTEMPRINCIPAL);
|
browser.webNavigation.loadURI(DUMMY2, loadURIOptionsReplaceHistory);
|
||||||
await waitForLoad(DUMMY2);
|
await waitForLoad(DUMMY2);
|
||||||
await checkHistory(browser, { count: 1, index: 0 });
|
await checkHistory(browser, { count: 1, index: 0 });
|
||||||
|
let loadURIOptionsBypassHistory = {
|
||||||
browser.webNavigation.loadURI(DUMMY1,
|
triggeringPrincipal: SYSTEMPRINCIPAL,
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY,
|
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_BYPASS_HISTORY,
|
||||||
null, null, null,
|
};
|
||||||
SYSTEMPRINCIPAL);
|
browser.webNavigation.loadURI(DUMMY1, loadURIOptionsBypassHistory);
|
||||||
await waitForLoad(DUMMY1);
|
await waitForLoad(DUMMY1);
|
||||||
await checkHistory(browser, { count: 1, index: 0 });
|
await checkHistory(browser, { count: 1, index: 0 });
|
||||||
|
|
||||||
@@ -132,20 +124,22 @@ add_task(async function test_badarguments() {
|
|||||||
let browser = gBrowser.selectedBrowser;
|
let browser = gBrowser.selectedBrowser;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
browser.webNavigation.loadURI(DUMMY1,
|
let loadURIOptionsBadPostData = {
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
triggeringPrincipal: SYSTEMPRINCIPAL,
|
||||||
null, {}, null,
|
postData: {},
|
||||||
SYSTEMPRINCIPAL);
|
};
|
||||||
|
browser.webNavigation.loadURI(DUMMY1, loadURIOptionsBadPostData);
|
||||||
ok(false, "Should have seen an exception from trying to pass some postdata");
|
ok(false, "Should have seen an exception from trying to pass some postdata");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ok(true, "Should have seen an exception from trying to pass some postdata");
|
ok(true, "Should have seen an exception from trying to pass some postdata");
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
browser.webNavigation.loadURI(DUMMY1,
|
let loadURIOptionsBadHeader = {
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_NONE,
|
triggeringPrincipal: SYSTEMPRINCIPAL,
|
||||||
null, null, {},
|
headers: {},
|
||||||
SYSTEMPRINCIPAL);
|
};
|
||||||
|
browser.webNavigation.loadURI(DUMMY1, loadURIOptionsBadHeader);
|
||||||
ok(false, "Should have seen an exception from trying to pass some headers");
|
ok(false, "Should have seen an exception from trying to pass some headers");
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
ok(true, "Should have seen an exception from trying to pass some headers");
|
ok(true, "Should have seen an exception from trying to pass some headers");
|
||||||
|
|||||||
@@ -208,9 +208,11 @@ const BackgroundPageThumbs = {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
webProgress.addProgressListener(this._listener, Ci.nsIWebProgress.NOTIFY_STATE_ALL);
|
webProgress.addProgressListener(this._listener, Ci.nsIWebProgress.NOTIFY_STATE_ALL);
|
||||||
let triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
};
|
||||||
wlBrowser.loadURI("chrome://global/content/backgroundPageThumbs.xhtml",
|
wlBrowser.loadURI("chrome://global/content/backgroundPageThumbs.xhtml",
|
||||||
0, null, null, null, triggeringPrincipal);
|
loadURIOptions);
|
||||||
this._windowlessContainer = wlBrowser;
|
this._windowlessContainer = wlBrowser;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@@ -101,10 +101,11 @@ const backgroundPageThumbsContent = {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// Bug 1498603 verify usages of systemPrincipal here
|
// Bug 1498603 verify usages of systemPrincipal here
|
||||||
let triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let loadURIOptions = {
|
||||||
this._webNav.loadURI(this._currentCapture.url,
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_STOP_CONTENT,
|
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_STOP_CONTENT,
|
||||||
null, null, null, triggeringPrincipal);
|
};
|
||||||
|
this._webNav.loadURI(this._currentCapture.url, loadURIOptions);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
this._failCurrentCapture("BAD_URI");
|
this._failCurrentCapture("BAD_URI");
|
||||||
}
|
}
|
||||||
@@ -224,10 +225,11 @@ const backgroundPageThumbsContent = {
|
|||||||
if (!docShell) {
|
if (!docShell) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let triggeringPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let loadURIOptions = {
|
||||||
this._webNav.loadURI("about:blank",
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
Ci.nsIWebNavigation.LOAD_FLAGS_STOP_CONTENT,
|
loadFlags: Ci.nsIWebNavigation.LOAD_FLAGS_STOP_CONTENT,
|
||||||
null, null, null, triggeringPrincipal);
|
};
|
||||||
|
this._webNav.loadURI("about:blank", loadURIOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
QueryInterface: ChromeUtils.generateQI([
|
QueryInterface: ChromeUtils.generateQI([
|
||||||
|
|||||||
@@ -281,7 +281,11 @@ var ViewSourceContent = {
|
|||||||
loadSourceFromURL(URL) {
|
loadSourceFromURL(URL) {
|
||||||
let loadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
let loadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||||
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
|
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
|
||||||
webNav.loadURI(URL, loadFlags, null, null, null, Services.scriptSecurityManager.getSystemPrincipal());
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
loadFlags,
|
||||||
|
};
|
||||||
|
webNav.loadURI(URL, loadURIOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -601,11 +605,13 @@ var ViewSourceContent = {
|
|||||||
let loadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
let loadFlags = Ci.nsIWebNavigation.LOAD_FLAGS_NONE;
|
||||||
let referrerPolicy = Ci.nsIHttpChannel.REFERRER_POLICY_UNSET;
|
let referrerPolicy = Ci.nsIHttpChannel.REFERRER_POLICY_UNSET;
|
||||||
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
|
let webNav = docShell.QueryInterface(Ci.nsIWebNavigation);
|
||||||
webNav.loadURIWithOptions(uri, loadFlags,
|
let loadURIOptions = {
|
||||||
null, referrerPolicy, // referrer
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
null, null, // postData, headers
|
loadFlags,
|
||||||
Services.io.newURI(baseURI),
|
referrerPolicy,
|
||||||
Services.scriptSecurityManager.getSystemPrincipal());
|
baseURI: Services.io.newURI(baseURI),
|
||||||
|
};
|
||||||
|
webNav.loadURI(uri, loadURIOptions);
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -798,11 +798,15 @@ class MozBrowser extends MozElementMixin(XULFrameElement) {
|
|||||||
triggeringPrincipal,
|
triggeringPrincipal,
|
||||||
postData,
|
postData,
|
||||||
} = aParams || {};
|
} = aParams || {};
|
||||||
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal,
|
||||||
|
referrerURI,
|
||||||
|
loadFlags: flags,
|
||||||
|
referrerPolicy,
|
||||||
|
postData,
|
||||||
|
};
|
||||||
this._wrapURIChangeCall(() =>
|
this._wrapURIChangeCall(() =>
|
||||||
this.webNavigation.loadURIWithOptions(
|
this.webNavigation.loadURI(aURI, loadURIOptions));
|
||||||
aURI, flags, referrerURI, referrerPolicy,
|
|
||||||
postData, null, null, triggeringPrincipal));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gotoIndex(aIndex) {
|
gotoIndex(aIndex) {
|
||||||
|
|||||||
@@ -108,6 +108,9 @@ HiddenFrame.prototype = {
|
|||||||
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
let systemPrincipal = Services.scriptSecurityManager.getSystemPrincipal();
|
||||||
docShell.createAboutBlankContentViewer(systemPrincipal);
|
docShell.createAboutBlankContentViewer(systemPrincipal);
|
||||||
docShell.useGlobalHistory = false;
|
docShell.useGlobalHistory = false;
|
||||||
this._browser.loadURI(XUL_PAGE, 0, null, null, null, systemPrincipal);
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: systemPrincipal,
|
||||||
|
};
|
||||||
|
this._browser.loadURI(XUL_PAGE, loadURIOptions);
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,7 +20,10 @@ const progressListeners = new Map();
|
|||||||
|
|
||||||
function loadContentWindow(windowlessBrowser, uri) {
|
function loadContentWindow(windowlessBrowser, uri) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
windowlessBrowser.loadURI(uri, Ci.nsIWebNavigation.LOAD_FLAGS_NONE, null, null, null, Services.scriptSecurityManager.getSystemPrincipal());
|
let loadURIOptions = {
|
||||||
|
triggeringPrincipal: Services.scriptSecurityManager.getSystemPrincipal(),
|
||||||
|
};
|
||||||
|
windowlessBrowser.loadURI(uri, loadURIOptions);
|
||||||
let docShell = windowlessBrowser.docShell;
|
let docShell = windowlessBrowser.docShell;
|
||||||
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
let webProgress = docShell.QueryInterface(Ci.nsIInterfaceRequestor)
|
||||||
.getInterface(Ci.nsIWebProgress);
|
.getInterface(Ci.nsIWebProgress);
|
||||||
|
|||||||
Reference in New Issue
Block a user