Revert "[WebRequest] Remove AddonManagerPermissions leftovers"

This commit is contained in:
Roy Tam 2020-01-31 08:14:25 +08:00
commit 2b2df633f6
3 changed files with 11 additions and 1 deletions

View file

@ -53,6 +53,11 @@ DOMInterfaces = {
'concrete': False
},
'AddonManagerPermissions': {
'wrapperCache': False,
'concrete': False
},
'AnimationEffectReadOnly': {
'concrete': False
},

View file

@ -8,6 +8,7 @@ module.exports = { // eslint-disable-line no-undef
"addMessageListener": false,
"removeEventListener": false,
"sendAsyncMessage": false,
"AddonManagerPermissions": false,
"initialProcessData": true,
},

View file

@ -720,7 +720,11 @@ HttpObserverManager = {
try {
let result = callback(data);
if (result && typeof result === "object" && opts.blocking) {
if (result && typeof result === "object" && opts.blocking
&& !AddonManagerPermissions.isHostPermitted(uri.host)
&& (!loadInfo || !loadInfo.loadingPrincipal
|| !loadInfo.loadingPrincipal.URI
|| !AddonManagerPermissions.isHostPermitted(loadInfo.loadingPrincipal.URI.host))) {
handlerResults.push({opts, result});
}
} catch (e) {