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: Use function declaration syntax Created Aug. 21, 2017, 2:14 p.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
« no previous file with comments | « dependencies ('k') | safari/contentBlocking.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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') | no next file with comments »

Powered by Google App Engine
This is Rietveld