mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-04 20:15:46 +01:00
Add util.weakReference that won't crash if you pass null.
This commit is contained in:
@@ -214,7 +214,7 @@ var Storage = Module("Storage", {
|
||||
if (ref) {
|
||||
let refs = overlay.getData(ref, "storage-refs");
|
||||
refs.push(callback);
|
||||
var callbackRef = Cu.getWeakReference(callback);
|
||||
var callbackRef = util.weakReference(callback);
|
||||
}
|
||||
else {
|
||||
callbackRef = { get: function () callback };
|
||||
|
||||
Reference in New Issue
Block a user