Index: lib/child/contentPolicy.js |
=================================================================== |
--- a/lib/child/contentPolicy.js |
+++ b/lib/child/contentPolicy.js |
@@ -60,17 +60,17 @@ let types = new Map(); |
* @param node {nsIDOMElement} |
* @param contentType {String} |
* @param location {String} |
* @param [callback] {Function} If present, the request will be sent |
* asynchronously and callback called with the |
* response |
* @return {Boolean} false if the request should be blocked |
*/ |
-function shouldAllow(window, node, contentType, location, callback) |
+let shouldAllow = exports.shouldAllow = function(window, node, contentType, location, callback) |
{ |
function processResponse(response) |
{ |
if (typeof response == "undefined") |
return true; |
let {allow, collapse, hits} = response; |
for (let {frameIndex, contentType, docDomain, thirdParty, location, filter} of hits) |
@@ -110,17 +110,17 @@ function shouldAllow(window, node, conte |
if (typeof callback == "function") |
{ |
sendAsyncMessage("AdblockPlus:ShouldAllow", data, (data) => { |
callback(processResponse(data)); |
}); |
} |
else |
return processResponse(sendSyncMessage("AdblockPlus:ShouldAllow", data)); |
-} |
+}; |
/** |
* Actual nsIContentPolicy and nsIChannelEventSink implementation |
* @class |
*/ |
var PolicyImplementation = |
{ |
classDescription: "Adblock Plus content policy", |