From f4651da8d8fbf972d1124f695116c07e25cbd0b5 Mon Sep 17 00:00:00 2001 From: eight Date: Sun, 7 Oct 2018 23:41:46 +0800 Subject: [PATCH] Drop deleteStyle --- background/storage.js | 12 ------------ background/style-manager.js | 1 + 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/background/storage.js b/background/storage.js index e3e01e3f..e79c637f 100644 --- a/background/storage.js +++ b/background/storage.js @@ -149,18 +149,6 @@ function filterStylesInternal({ : filtered; } -function deleteStyle({id, notify = true}) { - id = Number(id); - return dbExec('delete', id).then(() => { - invalidateCache({deletedId: id}); - if (notify) { - notifyAllTabs({method: 'styleDeleted', id}); - } - return id; - }); -} - - function compileExclusionRegexps(exclusions) { exclusions.forEach(exclusion => { if (!cachedStyles.exclusions.get(exclusion)) { diff --git a/background/style-manager.js b/background/style-manager.js index cac8ebd5..26e151ee 100644 --- a/background/style-manager.js +++ b/background/style-manager.js @@ -303,6 +303,7 @@ const styleManager = (() => { enabled: data.enabled, code }; + // FIXME: memory leak appliesTo.add(url); } }