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

Unified Diff: lib/filterComposer.js

Issue 5733398375038976: Issue 2132 - Only match exception rules when checking whether a page/frame is whitelisted (Closed)
Patch Set: Created March 12, 2015, 7:33 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 | « no previous file | lib/whitelisting.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterComposer.js
===================================================================
--- a/lib/filterComposer.js
+++ b/lib/filterComposer.js
@@ -18,7 +18,6 @@
let {extractHostFromFrame, stringifyURL, isThirdParty} = require("url");
let {getKey, isFrameWhitelisted} = require("whitelisting");
let {defaultMatcher} = require("matcher");
-let {WhitelistFilter} = require("filterClasses");
function escapeChar(chr)
{
@@ -97,13 +96,13 @@
{
url = stringifyURL(urlObj);
- let filter = defaultMatcher.matchesAny(
+ let filter = defaultMatcher.whitelist.matchesAny(
url, details.type, docDomain,
isThirdParty(urlObj, docDomain),
getKey(page, frame)
);
- if (!(filter instanceof WhitelistFilter))
+ if (!filter)
{
let filterText = url.replace(/^[\w\-]+:\/+(?:www\.)?/, "||");
« no previous file with comments | « no previous file | lib/whitelisting.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld