diff options
Diffstat (limited to 'Source/WebCore/inspector/front-end/EventListenersSidebarPane.js')
-rw-r--r-- | Source/WebCore/inspector/front-end/EventListenersSidebarPane.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js b/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js index bc8bb12..00576f1 100644 --- a/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js +++ b/Source/WebCore/inspector/front-end/EventListenersSidebarPane.js @@ -65,7 +65,10 @@ WebInspector.EventListenersSidebarPane.prototype = { this.sections = []; var self = this; - function callback(nodeId, eventListeners) { + function callback(error, eventListeners) { + if (error) + return; + var sectionNames = []; var sectionMap = {}; for (var i = 0; i < eventListeners.length; ++i) { @@ -77,7 +80,7 @@ WebInspector.EventListenersSidebarPane.prototype = { var type = eventListener.type; var section = sectionMap[type]; if (!section) { - section = new WebInspector.EventListenersSection(type, nodeId); + section = new WebInspector.EventListenersSection(type, node.id); sectionMap[type] = section; sectionNames.push(type); self.sections.push(section); @@ -101,7 +104,8 @@ WebInspector.EventListenersSidebarPane.prototype = { } } - WebInspector.EventListeners.getEventListenersForNodeAsync(node, callback); + if (node) + node.eventListeners(callback); }, _changeSetting: function(event) @@ -190,6 +194,8 @@ WebInspector.EventListenerBar.prototype = { properties.push(new WebInspector.RemoteObjectProperty(propertyName, value)); } this.updateProperties(properties); + if (nodeObject) + nodeObject.release(); } var node = this.eventListener.node; delete this.eventListener.node; @@ -202,7 +208,7 @@ WebInspector.EventListenerBar.prototype = { if (!node) return; - if (node.nodeType === Node.DOCUMENT_NODE) { + if (node.nodeType() === Node.DOCUMENT_NODE) { this.titleElement.textContent = "document"; return; } |