Skip to content

Commit

Permalink
Closes #130 Making USO data requests private
Browse files Browse the repository at this point in the history
  • Loading branch information
erikvold committed Jul 21, 2013
1 parent 070b493 commit 7b49a01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions extension/modules/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,10 @@ function lazyImport(obj, resource, symbols) {
try {
Components.utils.import(resource, _m);
}
catch (ex) {
catch (e) {
Components.utils.reportError("Failed to import resource: " + resource);
throw ex;
Components.utils.reportError(e);
throw e;
}
return _m;
});
Expand Down
5 changes: 4 additions & 1 deletion extension/modules/script/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ Script.prototype = {
let req = Instances.xhr;
req.overrideMimeType("text/plain");
req.open("GET", metaURL, true);
req.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE; // bypass cache
// bypass cache
req.channel.loadFlags |= Ci.nsIRequest.LOAD_BYPASS_CACHE;
// private channel
req.channel.QueryInterface(Components.interfaces.nsIPrivateBrowsingChannel).setPrivate(true);
req.onload = function() {
if (4 > req.readyState || (req.status != 200 && req.status != 0)
|| !req.responseText)
Expand Down

1 comment on commit 7b49a01

@erikvold
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oops that should be "Closes #136"

Please sign in to comment.