summaryrefslogtreecommitdiffstats
path: root/toolkit/modules/addons/WebRequest.jsm
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2020-04-14 21:49:04 +0200
commit39dac57259cff8b61db0b22cb2ad0a8adb02692e (patch)
tree52a026cc8c22793eb17fd0f5e22adce1ae08a1dd /toolkit/modules/addons/WebRequest.jsm
parenta1cce3b2b00bbd9f4983013ddd8934a7bccb9e99 (diff)
parentc2d9ab62f3d097c9e0e00184cab1f546554f5eaa (diff)
downloadUXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.gz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.lz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.tar.xz
UXP-39dac57259cff8b61db0b22cb2ad0a8adb02692e.zip
Merge branch 'redwood' into 28.9-platform
Diffstat (limited to 'toolkit/modules/addons/WebRequest.jsm')
-rw-r--r--toolkit/modules/addons/WebRequest.jsm14
1 files changed, 4 insertions, 10 deletions
diff --git a/toolkit/modules/addons/WebRequest.jsm b/toolkit/modules/addons/WebRequest.jsm
index c720dae5d..26118e43f 100644
--- a/toolkit/modules/addons/WebRequest.jsm
+++ b/toolkit/modules/addons/WebRequest.jsm
@@ -19,8 +19,6 @@ Cu.import("resource://gre/modules/Services.jsm");
Cu.import("resource://gre/modules/Task.jsm");
Cu.import("resource://gre/modules/XPCOMUtils.jsm");
-XPCOMUtils.defineLazyModuleGetter(this, "AppConstants",
- "resource://gre/modules/AppConstants.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "BrowserUtils",
"resource://gre/modules/BrowserUtils.jsm");
XPCOMUtils.defineLazyModuleGetter(this, "ExtensionUtils",
@@ -720,11 +718,7 @@ HttpObserverManager = {
try {
let result = callback(data);
- if (result && typeof result === "object" && opts.blocking
- && !AddonManagerPermissions.isHostPermitted(uri.host)
- && (!loadInfo || !loadInfo.loadingPrincipal
- || !loadInfo.loadingPrincipal.URI
- || !AddonManagerPermissions.isHostPermitted(loadInfo.loadingPrincipal.URI.host))) {
+ if (result && typeof result === "object" && opts.blocking) {
handlerResults.push({opts, result});
}
} catch (e) {
@@ -846,9 +840,9 @@ var onBeforeRequest = {
get allowedOptions() {
delete this.allowedOptions;
this.allowedOptions = ["blocking"];
- if (!AppConstants.RELEASE_OR_BETA) {
- this.allowedOptions.push("requestBody");
- }
+#ifndef RELEASE_OR_BETA
+ this.allowedOptions.push("requestBody");
+#endif
return this.allowedOptions;
},
addListener(callback, filter = null, opt_extraInfoSpec = null) {