Bug 962724 - Ignore native event listeners without a type. r=vporof, a=sledru
authorPanos Astithas <past@mozilla.com>
Wed, 29 Jan 2014 11:23:10 +0200
changeset 176136 ae62da61f2ce98c4eeb88a6cfb45b7382b4b92eb
parent 176135 2370642e862579eb67fc427409a730bad228a0b1
child 176137 9737a63a47cf0774e1744cf88f45f01c165054d6
push id445
push userffxbld
push dateMon, 10 Mar 2014 22:05:19 +0000
treeherdermozilla-release@dc38b741b04e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvporof, sledru
bugs962724
milestone28.0a2
Bug 962724 - Ignore native event listeners without a type. r=vporof, a=sledru
toolkit/devtools/server/actors/script.js
--- a/toolkit/devtools/server/actors/script.js
+++ b/toolkit/devtools/server/actors/script.js
@@ -1659,19 +1659,19 @@ ThreadActor.prototype = {
 
     for (let node of nodes) {
       let handlers = els.getListenerInfoFor(node);
 
       for (let handler of handlers) {
         // Create a form object for serializing the listener via the protocol.
         let listenerForm = Object.create(null);
         let listener = handler.listenerObject;
-        // Native event listeners don't provide any listenerObject and are not
-        // that useful to a JS debugger.
-        if (!listener) {
+        // Native event listeners don't provide any listenerObject or type and
+        // are not that useful to a JS debugger.
+        if (!listener || !handler.type) {
           continue;
         }
 
         // There will be no tagName if the event listener is set on the window.
         let selector = node.tagName ? findCssSelector(node) : "window";
         let nodeDO = this.globalDebugObject.makeDebuggeeValue(node);
         listenerForm.node = {
           selector: selector,