mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2025-12-24 09:12:28 +01:00
Tie storage observers to a weak reference of window so they're automatically destroyed.
This commit is contained in:
@@ -236,10 +236,7 @@ function Bookmarks() //{{{
|
||||
};
|
||||
|
||||
var cache = storage.newObject("bookmark-cache", Cache, false);
|
||||
storage.addObserver("bookmark-cache", bookmarkObserver);
|
||||
liberator.registerObserver("shutdown", function () {
|
||||
storage.removeObserver("bookmark-cache", bookmarkObserver);
|
||||
});
|
||||
storage.addObserver("bookmark-cache", bookmarkObserver, window);
|
||||
|
||||
liberator.registerObserver("enter", function () {
|
||||
if (options["preload"])
|
||||
|
||||
Reference in New Issue
Block a user