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

Unified Diff: lib/popupBlocker.js

Issue 29998582: Issue [TBD] - Update adblockpluscore dependency to [TBD] Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Remove matchRequest Created Feb. 5, 2019, 5:15 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/popupBlocker.js
===================================================================
--- a/lib/popupBlocker.js
+++ b/lib/popupBlocker.js
@@ -17,17 +17,16 @@
/** @module popupBlocker */
"use strict";
const {defaultMatcher} = require("../adblockpluscore/lib/matcher");
const {BlockingFilter,
RegExpFilter} = require("../adblockpluscore/lib/filterClasses");
-const {isThirdParty} = require("../adblockpluscore/lib/domain");
const {extractHostFromFrame} = require("./url");
const {checkWhitelisted} = require("./whitelisting");
const {logRequest} = require("./hitLogger");
let loadingPopups = new Map();
function forgetPopup(tabId)
{
@@ -41,34 +40,33 @@
browser.tabs.onRemoved.removeListener(forgetPopup);
}
}
function checkPotentialPopup(tabId, popup)
{
let url = popup.url || "about:blank";
let documentHost = extractHostFromFrame(popup.sourceFrame);
- let thirdParty = isThirdParty(new URL(url), documentHost);
let specificOnly = !!checkWhitelisted(
popup.sourcePage, popup.sourceFrame, null,
RegExpFilter.typeMap.GENERICBLOCK
);
let filter = defaultMatcher.matchesAny(
url, RegExpFilter.typeMap.POPUP,
- documentHost, thirdParty, null, specificOnly
+ documentHost, null, specificOnly
);
if (filter instanceof BlockingFilter)
browser.tabs.remove(tabId);
logRequest(
[popup.sourcePage.id],
- {url, type: "POPUP", docDomain: documentHost, thirdParty, specificOnly},
+ {url, type: "POPUP", docDomain: documentHost, specificOnly},
filter
);
}
function onPopupURLChanged(details)
{
// Ignore frames inside the popup window.
if (details.frameId != 0)
« lib/csp.js ('K') | « lib/filterComposer.js ('k') | lib/requestBlocker.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld