summaryrefslogtreecommitdiff
path: root/devtools/client
diff options
context:
space:
mode:
authorjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-30 22:57:23 +0200
committerjanekptacijarabaci <janekptacijarabaci@seznam.cz>2018-04-30 22:57:23 +0200
commit74858918fa2445f7e4ebc4b615ec073d528039f1 (patch)
tree1ac596813ae2b6ab87488e04bdbda98d9d070b0d /devtools/client
parent80edefc958f4216bb5982e48a58fd241c69a54db (diff)
downloaduxp-74858918fa2445f7e4ebc4b615ec073d528039f1.tar.gz
Bug 1329032 - Extend loadURIWithOptions by a triggeringPrincipal (without an hard e10s)
Diffstat (limited to 'devtools/client')
-rw-r--r--devtools/client/responsive.html/browser/web-navigation.js8
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,
});
},