Event pane doesn't display any events when a media element with controls attribute is present

RESOLVED FIXED in Firefox 33

Status

defect
P2
normal
RESOLVED FIXED
5 years ago
Last year

People

(Reporter: rowbot, Assigned: past)

Tracking

33 Branch
Firefox 34
Bug Flags:
in-testsuite +

Firefox Tracking Flags

(firefox33 fixed, firefox34 fixed)

Details

Attachments

(2 attachments)

Steps to Reproduce:
1) Open attached test case.
2) Open debugger and select the event pane.

Actual Results:
No events of any type are displayed in the event pane.

Expected Results:
All events on the page should be displayed.

Removing the controls attribute from the video element causes events to be displayed as expected.  This also affects audio elements.
Browser Console show the following:

Handler function DebuggerClient.requester threw an exception: Error: getDefinitionSite is only valid for function grips.
Stack: ObjectClient.prototype.getDefinitionSite<.before@resource://gre/modules/devtools/dbg-client.jsm:2205:1
DebuggerClient.requester/<@resource://gre/modules/devtools/dbg-client.jsm:329:24
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
EventListeners.prototype._getDefinitionSite@chrome://browser/content/devtools/debugger-controller.js:1749:5
EventListeners.prototype._getListeners/<@chrome://browser/content/devtools/debugger-controller.js:1722:36
TaskImpl_run@resource://gre/modules/Task.jsm:314:40
TaskImpl@resource://gre/modules/Task.jsm:275:3
createAsyncFunction/asyncFunction@resource://gre/modules/Task.jsm:249:14
DebuggerClient.requester/</<@resource://gre/modules/devtools/dbg-client.jsm:344:9
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
emit@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/commonjs/sdk/event/core.js:96:9
Request.prototype.emit@resource://gre/modules/devtools/dbg-client.jsm:1087:29
DebuggerClient.prototype.onPacket/<@resource://gre/modules/devtools/dbg-client.jsm:922:9
resolve@resource://gre/modules/devtools/deprecated-sync-thenables.js:40:40
then@resource://gre/modules/devtools/deprecated-sync-thenables.js:20:43
then@resource://gre/modules/devtools/deprecated-sync-thenables.js:58:9
DebuggerClient.prototype.onPacket@resource://gre/modules/devtools/dbg-client.jsm:861:1
LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:545:11
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
EventLoop.prototype.enter@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:432:5
ThreadActor.prototype._pushThreadPause@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:602:5
ThreadActor.prototype.onInterrupt@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/actors/script.js:1776:7
DSC_onPacket@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/server/main.js:1223:15
LocalDebuggerTransport.prototype.send/<@resource://gre/modules/devtools/dbg-client.jsm -> resource://gre/modules/devtools/transport/transport.js:545:11
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
makeInfallible/<@resource://gre/modules/commonjs/toolkit/loader.js -> resource://gre/modules/devtools/DevToolsUtils.js:83:14
Line: 2205, column: 0 DevToolsUtils.js:59
That error is fixed in the latest nightly, but there is another one that happens once we are past that. Patch forthcoming.
Assignee: nobody → past
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P2
I've added the same check as in _getAllEventListeners, which I was reluctant to add previously without a use case that needed it.
Attachment #8459579 - Flags: review?(vporof)
Comment on attachment 8459579 [details] [diff] [review]
Properly deal with event handlers that the debugger cannot unwrap

Review of attachment 8459579 [details] [diff] [review]:
-----------------------------------------------------------------

::: browser/devtools/debugger/test/doc_native-event-handler.html
@@ +9,5 @@
> +      function initialSetup(event) {
> +        debugger;
> +      }
> +
> +  		window.addEventListener("load", function() {}, false);

Is this crazy indentation intentional?
Attachment #8459579 - Flags: review?(vporof) → review+
(In reply to Victor Porof [:vporof][:vp] from comment #5)
> Is this crazy indentation intentional?

Duh, that's what I get for copying a file with hard tabs in it. Fixed.
https://hg.mozilla.org/mozilla-central/rev/7ff31c7b215e
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 34
Comment on attachment 8459579 [details] [diff] [review]
Properly deal with event handlers that the debugger cannot unwrap

Approval Request Comment
[Feature/regressing bug #]: this has been a problem for a very long time
[User impact if declined]: the debugger events pane will not work in some cases
[Describe test coverage new/current, TBPL]: browser chrome test and manual testing in m-c
[Risks and why]: almost no risk, tiny change to a part of the code that only developers will ever interact with
[String/UUID change made/needed]: none
Attachment #8459579 - Flags: approval-mozilla-aurora?
The patch seems to have fixed the problem for me. Thanks for the quick fix.
Flags: in-testsuite+
Attachment #8459579 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.