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

Unified Diff: lib/filterStorage.js

Issue 29853574: Issue 6855 - Release all references to Subscription object once removed (Closed) Base URL: https://hg.adblockplus.org/adblockpluscore/
Patch Set: Simplify Created Aug. 12, 2018, 5:40 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/filterStorage.js
===================================================================
--- a/lib/filterStorage.js
+++ b/lib/filterStorage.js
@@ -144,16 +144,20 @@
{
if (FilterStorage.subscriptions[i].url == subscription.url)
{
removeSubscriptionFilters(subscription);
FilterStorage.subscriptions.splice(i--, 1);
FilterStorage.knownSubscriptions.delete(subscription.url);
FilterNotifier.triggerListeners("subscription.removed", subscription);
+
+ // This should be the last remaining reference to the Subscription
+ // object.
+ Subscription.knownSubscriptions.delete(subscription.url);
return;
}
}
},
/**
* Moves a subscription in the list to a new position.
* @param {Subscription} subscription filter subscription to be moved
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld