diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-30 22:57:23 +0200 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-04-30 22:57:23 +0200 |
commit | 0e5676bcb56563253725175d95331483ed1ac4cd (patch) | |
tree | 1ac596813ae2b6ab87488e04bdbda98d9d070b0d /devtools | |
parent | 4fba669710f7719d34a60f62552c52dd7d84934f (diff) | |
download | uxp-0e5676bcb56563253725175d95331483ed1ac4cd.tar.gz |
Bug 1329032 - Extend loadURIWithOptions by a triggeringPrincipal (without an hard e10s)
Diffstat (limited to 'devtools')
-rw-r--r-- | devtools/client/responsive.html/browser/web-navigation.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/devtools/client/responsive.html/browser/web-navigation.js b/devtools/client/responsive.html/browser/web-navigation.js index 4519df0bdc..eee24993ac 100644 --- a/devtools/client/responsive.html/browser/web-navigation.js +++ b/devtools/client/responsive.html/browser/web-navigation.js @@ -8,6 +8,7 @@ const { Ci, Cu, Cr } = require("chrome"); const { XPCOMUtils } = require("resource://gre/modules/XPCOMUtils.jsm"); const Services = require("Services"); const { NetUtil } = require("resource://gre/modules/NetUtil.jsm"); +const { Utils } = require("resource://gre/modules/sessionstore/Utils.jsm"); function readInputStreamToString(stream) { return NetUtil.readInputStreamToString(stream, stream.available()); @@ -61,11 +62,11 @@ BrowserElementWebNavigation.prototype = { // No equivalent in the current BrowserElement API this.loadURIWithOptions(uri, flags, referrer, Ci.nsIHttpChannel.REFERRER_POLICY_DEFAULT, - postData, headers, null); + postData, headers, null, null); }, loadURIWithOptions(uri, flags, referrer, referrerPolicy, postData, headers, - baseURI) { + baseURI, triggeringPrincipal) { // No equivalent in the current BrowserElement API this._sendMessage("WebNavigation:LoadURI", { uri, @@ -75,6 +76,9 @@ BrowserElementWebNavigation.prototype = { postData: postData ? readInputStreamToString(postData) : null, headers: headers ? readInputStreamToString(headers) : null, baseURI: baseURI ? baseURI.spec : null, + triggeringPrincipal: triggeringPrincipal + ? Utils.serializePrincipal(triggeringPrincipal) + : null, }); }, |