1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-05-01 16:24:05 +02:00

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

This commit is contained in:
Kris Maglione
2008-12-20 14:36:11 -05:00
parent e1d5236261
commit ef827139e4
3 changed files with 21 additions and 13 deletions
+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)
{