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
@@ -320,10 +320,7 @@ function Options() //{{{
}
storage.newMap("options", false);
storage.addObserver("options", optionObserver);
liberator.registerObserver("shutdown", function () {
storage.removeObserver("options", optionObserver);
});
storage.addObserver("options", optionObserver, window);
function storePreference(name, value)
{