mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-13 04:15:47 +01:00
Add util.weakReference that won't crash if you pass null.
This commit is contained in:
@@ -113,7 +113,7 @@ var Prefs = Module("prefs", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReference])
|
||||
|
||||
if (!this._observers[pref])
|
||||
this._observers[pref] = [];
|
||||
this._observers[pref].push(!strong ? Cu.getWeakReference(callback) : { get: function () callback });
|
||||
this._observers[pref].push(!strong ? util.weakReference(callback) : { get: function () callback });
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user