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

Unified Diff: lib/devtools.js

Issue 29991594: Issue 7243 - Update adblockpluscore dependency to hg:e26e122e0702 (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Remove third-party checks from QUnit tests Created Jan. 31, 2019, 12:56 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
« no previous file with comments | « lib/csp.js ('k') | lib/filterComposer.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/devtools.js
===================================================================
--- a/lib/devtools.js
+++ b/lib/devtools.js
@@ -78,19 +78,21 @@
record.request.docDomain == request.docDomain &&
// Ignore partial (e.g. ELEMHIDE) whitelisting if there is already
// a DOCUMENT exception which disables all means of blocking.
(record.request.type == "DOCUMENT" ?
nonRequestTypes.includes(request.type) :
record.request.type == request.type) &&
- // Matched element hiding filters don't relate to a particular request,
- // so we have to compare the selector in order to avoid duplicates.
- (record.filter && record.filter.selector) == (filter && filter.selector)
+ // Matched element hiding and CSP filters don't relate to a particular
+ // request, so we have to compare the selector or the CSP value in order to
+ // avoid duplicates.
+ (record.filter && record.filter.selector) == (filter && filter.selector) &&
+ (record.filter && record.filter.csp) == (filter && filter.csp)
);
}
function addRecord(panel, request, filter)
{
if (!hasRecord(panel, request, filter))
{
panel.port.postMessage({
« no previous file with comments | « lib/csp.js ('k') | lib/filterComposer.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld