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 'concrete': False
}, },
'AddonManagerPermissions': {
'wrapperCache': False,
'concrete': False
},
'AnimationEffectReadOnly': { 'AnimationEffectReadOnly': {
'concrete': False 'concrete': False
}, },

View file

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

View file

@ -720,7 +720,11 @@ HttpObserverManager = {
try { try {
let result = callback(data); 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}); handlerResults.push({opts, result});
} }
} catch (e) { } catch (e) {