[Pkg-mozext-commits] [greasemonkey] 01/41: Update xmlhttprequester.js

David Prévot taffit at moszumanska.debian.org
Thu Apr 30 22:06:31 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 461073a5dbaf8dd7e1ddcb2b20786fa57e8ed518
Author: janekptacijarabaci <janekptacijarabaci at users.noreply.github.com>
Date:   Sun Nov 2 20:46:53 2014 +0100

    Update xmlhttprequester.js
---
 modules/xmlhttprequester.js | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/xmlhttprequester.js b/modules/xmlhttprequester.js
index 92a2b23..3e1be19 100644
--- a/modules/xmlhttprequester.js
+++ b/modules/xmlhttprequester.js
@@ -1,5 +1,6 @@
 var EXPORTED_SYMBOLS = ['GM_xmlhttpRequester'];
 
+Components.utils.import("resource://gre/modules/PrivateBrowsingUtils.jsm");
 Components.utils.import("resource://greasemonkey/util.js");
 
 function GM_xmlhttpRequester(wrappedContentWin, originUrl, sandbox) {
@@ -96,6 +97,12 @@ function(safeUrl, details, req) {
   req.open(details.method, safeUrl,
       !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;
+  }
+
   if (details.overrideMimeType) {
     req.overrideMimeType(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