mirror of
https://github.com/gryf/pentadactyl-pm.git
synced 2026-01-04 02:04:14 +01:00
Add util.weakReference that won't crash if you pass null.
This commit is contained in:
@@ -50,8 +50,8 @@ var EventHive = Class("EventHive", Contexts.Hive, {
|
||||
var [self, events] = this._events(event, callback);
|
||||
|
||||
for (let [event, callback] in Iterator(events)) {
|
||||
let args = [Cu.getWeakReference(target),
|
||||
self ? Cu.getWeakReference(self) : { get: function () null },
|
||||
let args = [util.weakReference(target),
|
||||
util.weakReference(self),
|
||||
event,
|
||||
this.wrapListener(callback, self),
|
||||
capture,
|
||||
|
||||
Reference in New Issue
Block a user