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:
Eddy Bruel 2016-08-01 09:09:00 +02:00
parent 04c4fa957d
commit c8d0c59aee

View File

@ -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()) {