Tie storage observers to a weak reference of window so they're automatically destroyed.

This commit is contained in:
Kris Maglione committed 2008-12-20 14:36:11 -05:00
1 parent e1d5236261
commit ef827139e4
3 files changed
+21 -13

No files matched your search

+1 -4
View File
@@ -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"])