RESOLVED FIXED 74298
Web Inspector: report per document JS event listener count
https://bugs.webkit.org/show_bug.cgi?id=74298
Summary Web Inspector: report per document JS event listener count
Yury Semikhatsky
Reported 2011-12-12 08:36:58 PST
Memory agent should report per document JS event listener count.
Attachments
Patch (3.37 KB, patch)
2011-12-12 08:55 PST, Yury Semikhatsky
no flags
Patch (11.43 KB, patch)
2011-12-27 07:00 PST, Yury Semikhatsky
no flags
Patch (14.46 KB, patch)
2011-12-27 07:26 PST, Yury Semikhatsky
no flags
Patch (14.46 KB, patch)
2011-12-27 07:28 PST, Yury Semikhatsky
pfeldman: review+
Yury Semikhatsky
Comment 1 2011-12-12 08:55:06 PST
Yury Semikhatsky
Comment 2 2011-12-12 08:58:19 PST
(In reply to comment #1) > Created an attachment (id=118802) [details] > Patch This patch will not report listeners set on document.body element since they are forwarded to corresponding DOMWindow object. We may show DOMWindow as a separate entity under Document(if it is still reacgable from the Document) in the memory report or even try to collect separate statistics on DOMWindows.
Pavel Feldman
Comment 3 2011-12-12 10:39:53 PST
Comment on attachment 118802 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=118802&action=review > Source/WebCore/inspector/InspectorMemoryAgent.cpp:114 > + EventListenerIterator iterator(node); similarly to the nameToCount you could introduce eventTypeToCount here and use return by-type stats (as in InspectorDOMAgent:742) > Source/WebCore/inspector/InspectorMemoryAgent.cpp:117 > + result++; ++result;
Yury Semikhatsky
Comment 4 2011-12-27 07:00:47 PST
Yury Semikhatsky
Comment 5 2011-12-27 07:01:12 PST
(In reply to comment #3) > (From update of attachment 118802 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=118802&action=review > > > Source/WebCore/inspector/InspectorMemoryAgent.cpp:114 > > + EventListenerIterator iterator(node); > > similarly to the nameToCount you could introduce eventTypeToCount here and use return by-type stats (as in InspectorDOMAgent:742) Done. > > > Source/WebCore/inspector/InspectorMemoryAgent.cpp:117 > > + result++; > > ++result; Done.
Yury Semikhatsky
Comment 6 2011-12-27 07:26:34 PST
Yury Semikhatsky
Comment 7 2011-12-27 07:28:08 PST
Yury Semikhatsky
Comment 8 2011-12-27 08:22:17 PST
Note You need to log in before you can comment on or make changes to this bug.