Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: lib/requestBlocker.js

Issue 29503587: Issue 5464 - Upgrade to new asynchronous version of abp2blocklist (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Split out setContentBlocker handlers into then and catch, move patch to lib/requestBlocker.js Created Aug. 16, 2017, 10:17 a.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: lib/requestBlocker.js
===================================================================
--- a/lib/requestBlocker.js
+++ b/lib/requestBlocker.js
@@ -24,16 +24,20 @@
let {defaultMatcher} = require("matcher");
let {FilterNotifier} = require("filterNotifier");
let {Prefs} = require("prefs");
let {checkWhitelisted, getKey} = require("whitelisting");
let {stringifyURL, extractHostFromFrame, isThirdParty} = require("url");
let {port} = require("messaging");
let devtools = require("devtools");
+// Patch RegExpFilter.typeMap with WEBRTC, because abp2blocklist needs it and
+// our version of core doesn't support it yet. See issue #5464.
+RegExpFilter.typeMap.WEBRTC = 256;
+
ext.webRequest.getIndistinguishableTypes().forEach(types =>
{
for (let i = 1; i < types.length; i++)
RegExpFilter.typeMap[types[i]] = RegExpFilter.typeMap[types[0]];
});
function onBeforeRequestAsync(page, url, type, docDomain,
thirdParty, sitekey,
« no previous file with comments | « dependencies ('k') | safari/contentBlocking.js » ('j') | safari/contentBlocking.js » ('J')

Powered by Google App Engine
This is Rietveld