mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-25 13:51:41 +00:00
Bug 1184661 - If a listener is not callable, assume it is an event listener object. r=past
--HG-- extra : rebase_source : cbea66acb5acfbdc1b83acd797566bb5a5be1c75
This commit is contained in:
parent
04c4fa957d
commit
c8d0c59aee
@ -1128,8 +1128,8 @@ const ThreadActor = ActorClassWithSpec(threadSpec, {
|
||||
l.type = handler.type;
|
||||
let listener = handler.listenerObject;
|
||||
let listenerDO = this.globalDebugObject.makeDebuggeeValue(listener);
|
||||
// If the listener is an object with a 'handleEvent' method, use that.
|
||||
if (listenerDO.class == "Object" || listenerDO.class == "XULElement") {
|
||||
// If the listener is not callable, assume it is an event handler object.
|
||||
if (!listenerDO.callable) {
|
||||
// For some events we don't have permission to access the
|
||||
// 'handleEvent' property when running in content scope.
|
||||
if (!listenerDO.unwrap()) {
|
||||
|
Loading…
Reference in New Issue
Block a user