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

Unified Diff: lib/devtools.js

Issue 29877564: Issue 6933 - Update adblockpluscore dependency to hg:dcda4859fcbd (Closed) Base URL: https://hg.adblockplus.org/adblockpluschrome/
Patch Set: Modify callback for subscription.removed (#6908) Created Sept. 10, 2018, 6:04 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 | « 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
@@ -19,17 +19,17 @@
const {RegExpFilter,
WhitelistFilter,
ElemHideFilter} = require("../adblockpluscore/lib/filterClasses");
const {SpecialSubscription} =
require("../adblockpluscore/lib/subscriptionClasses");
const {FilterStorage} = require("../adblockpluscore/lib/filterStorage");
const {defaultMatcher} = require("../adblockpluscore/lib/matcher");
-const {FilterNotifier} = require("../adblockpluscore/lib/filterNotifier");
+const {filterNotifier} = require("../adblockpluscore/lib/filterNotifier");
const {extractHostFromFrame} = require("./url");
const {port} = require("./messaging");
const {HitLogger, nonRequestTypes} = require("./hitLogger");
let panels = new Map();
function isActivePanel(panel)
{
@@ -47,17 +47,17 @@
function getFilterInfo(filter)
{
if (!filter)
return null;
let userDefined = false;
let subscriptionTitle = null;
- for (let subscription of filter.subscriptions)
+ for (let subscription of filter.subscriptions())
{
if (!subscription.disabled)
{
if (subscription instanceof SpecialSubscription)
userDefined = true;
else
subscriptionTitle = subscription.title;
}
@@ -249,31 +249,31 @@
types: ["main_frame"],
tabId: inspectedTabId
}
);
if (panels.size == 0)
{
ext.pages.onLoading.addListener(onLoading);
- FilterNotifier.on("filter.added", onFilterAdded);
- FilterNotifier.on("filter.removed", onFilterRemoved);
- FilterNotifier.on("subscription.added", onSubscriptionAdded);
+ filterNotifier.on("filter.added", onFilterAdded);
+ filterNotifier.on("filter.removed", onFilterRemoved);
+ filterNotifier.on("subscription.added", onSubscriptionAdded);
}
newPort.onDisconnect.addListener(() =>
{
HitLogger.removeListener(inspectedTabId, hitListener);
panels.delete(inspectedTabId);
browser.webRequest.onBeforeRequest.removeListener(localOnBeforeRequest);
if (panels.size == 0)
{
ext.pages.onLoading.removeListener(onLoading);
- FilterNotifier.off("filter.added", onFilterAdded);
- FilterNotifier.off("filter.removed", onFilterRemoved);
- FilterNotifier.off("subscription.added", onSubscriptionAdded);
+ filterNotifier.off("filter.added", onFilterAdded);
+ filterNotifier.off("filter.removed", onFilterRemoved);
+ filterNotifier.off("subscription.added", onSubscriptionAdded);
}
});
HitLogger.addListener(inspectedTabId, hitListener);
panels.set(inspectedTabId, panel);
});
« 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