[Pkg-mozext-commits] [greasemonkey] 03/41: Update xmlhttprequester.js (the constructor - this.stringBundle, the channel to be private)
David Prévot
taffit at moszumanska.debian.org
Thu Apr 30 22:06:32 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository greasemonkey.
commit d80c560d8c58e2ef8cdba4516d9558d233b89bc3
Author: janekptacijarabaci <janekptacijarabaci at users.noreply.github.com>
Date: Tue Nov 4 13:14:16 2014 +0100
Update xmlhttprequester.js (the constructor - this.stringBundle, the channel to be private)
---
modules/xmlhttprequester.js | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/xmlhttprequester.js b/modules/xmlhttprequester.js
index 45bdf9b..9c4b2fd 100644
--- a/modules/xmlhttprequester.js
+++ b/modules/xmlhttprequester.js
@@ -7,6 +7,10 @@ function GM_xmlhttpRequester(wrappedContentWin, originUrl, sandbox) {
this.wrappedContentWin = wrappedContentWin;
this.originUrl = originUrl;
this.sandboxPrincipal = Components.utils.getObjectPrincipal(sandbox);
+ this.stringBundle = Components
+ .classes["@mozilla.org/intl/stringbundle;1"]
+ .getService(Components.interfaces.nsIStringBundleService)
+ .createBundle("chrome://greasemonkey/locale/greasemonkey.properties");
}
// this function gets called by user scripts in content security scope to
@@ -98,9 +102,8 @@ function(safeUrl, details, req) {
!details.synchronous, details.user || "", details.password || "");
if (PrivateBrowsingUtils.isWindowPrivate(this.wrappedContentWin)) {
- req.channel.loadFlags |= Components.interfaces.nsIRequest.LOAD_ANONYMOUS
- | Components.interfaces.nsIRequest.LOAD_BYPASS_CACHE
- | Components.interfaces.nsIRequest.INHIBIT_PERSISTENT_CACHING;
+ var channel = req.channel.QueryInterface(Components.interfaces.nsIPrivateBrowsingChannel);
+ channel.setPrivate(true);
}
if (details.overrideMimeType) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/greasemonkey.git
More information about the Pkg-mozext-commits
mailing list