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

Side by Side Diff: lib/contentPolicy.js

Issue 29340656: Issue 3960 - Console errors due to wrong variable name (Closed)
Patch Set: Created April 20, 2016, 2:04 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * This file is part of Adblock Plus <https://adblockplus.org/>, 2 * This file is part of Adblock Plus <https://adblockplus.org/>,
3 * Copyright (C) 2006-2016 Eyeo GmbH 3 * Copyright (C) 2006-2016 Eyeo GmbH
4 * 4 *
5 * Adblock Plus is free software: you can redistribute it and/or modify 5 * Adblock Plus is free software: you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License version 3 as 6 * it under the terms of the GNU General Public License version 3 as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
8 * 8 *
9 * Adblock Plus is distributed in the hope that it will be useful, 9 * Adblock Plus is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
(...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 for (let i = 0; i < frames.length; i++) 267 for (let i = 0; i < frames.length; i++)
268 { 268 {
269 let frame = frames[i]; 269 let frame = frames[i];
270 let wndLocation = frame.location; 270 let wndLocation = frame.location;
271 let parentWndLocation = frames[Math.min(i + 1, frames.length - 1)].locatio n; 271 let parentWndLocation = frames[Math.min(i + 1, frames.length - 1)].locatio n;
272 let parentDocDomain = getHostname(parentWndLocation); 272 let parentDocDomain = getHostname(parentWndLocation);
273 273
274 let match = defaultMatcher.matchesAny(wndLocation, typeMap, parentDocDomai n, false, sitekey); 274 let match = defaultMatcher.matchesAny(wndLocation, typeMap, parentDocDomai n, false, sitekey);
275 if (match instanceof WhitelistFilter) 275 if (match instanceof WhitelistFilter)
276 { 276 {
277 let whitelistType = (whitelistMatch.contentType & RegExpFilter.typeMap.D OCUMENT) ? "DOCUMENT" : "ELEMHIDE"; 277 let whitelistType = (match.contentType & RegExpFilter.typeMap.DOCUMENT) ? "DOCUMENT" : "ELEMHIDE";
278 return [i, whitelistType, parentDocDomain, false, wndLocation, match]; 278 return [i, whitelistType, parentDocDomain, false, wndLocation, match];
279 } 279 }
280 280
281 if (!nogenericHit) 281 if (!nogenericHit)
282 { 282 {
283 match = defaultMatcher.matchesAny(wndLocation, 283 match = defaultMatcher.matchesAny(wndLocation,
284 RegExpFilter.typeMap[genericType], parentDocDomain, false, sitekey); 284 RegExpFilter.typeMap[genericType], parentDocDomain, false, sitekey);
285 if (match instanceof WhitelistFilter) 285 if (match instanceof WhitelistFilter)
286 nogenericHit = [i, genericType, parentDocDomain, false, wndLocation, m atch]; 286 nogenericHit = [i, genericType, parentDocDomain, false, wndLocation, m atch];
287 } 287 }
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 { 423 {
424 // EffectiveTLDService throws on IP addresses, just compare the host name 424 // EffectiveTLDService throws on IP addresses, just compare the host name
425 let host = ""; 425 let host = "";
426 try 426 try
427 { 427 {
428 host = uri.host; 428 host = uri.host;
429 } catch (e) {} 429 } catch (e) {}
430 return host != docDomain; 430 return host != docDomain;
431 } 431 }
432 } 432 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld