mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-03-10 06:15:47 +01:00
Add util.weakReference that won't crash if you pass null.
This commit is contained in:
@@ -74,7 +74,7 @@ var Overlay = Module("Overlay", XPCOM([Ci.nsIObserver, Ci.nsISupportsWeakReferen
|
||||
[self, events] = [event, event[callback || "events"]];
|
||||
|
||||
for (let [event, callback] in Iterator(events)) {
|
||||
let args = [Cu.getWeakReference(target),
|
||||
let args = [util.weakReference(target),
|
||||
event,
|
||||
util.wrapCallback(callback, self),
|
||||
capture,
|
||||
|
||||
Reference in New Issue
Block a user