Closed Bug 697300 Opened 9 years ago Closed 9 years ago
Cascaded event listeners don't throw exceptions
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0a1) Gecko/20111025 Firefox/10.0a1 Build ID: 20111025031041 Steps to reproduce: Neither exceptions or user defined exceptions are thrown on the error console when the execution context in a DOM3 CustomEvent listener. See my attachment testcase.xhml
This page http://jsfiddle.net/2Kvpy/6/ throws an exception. It is not shown in the Web Console.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Linux → All
Hardware: x86_64 → All
Version: 10 Branch → Trunk
This is not special to custom events, is it?
I think it is (same code but with a click event works as expected).
Attachment #569532 - Attachment mime type: application/octet-stream → application/xhtml+xml
(In reply to Paul Rouget [:paul] from comment #3) > I think it is (same code but with a click event works as expected). If I change your testcase to create "Event" and call initEvent, the behavior is the same as with creating CustomEvent. And I see same behavior with MouseEvent.click too. It is not clear to me this has anything to do with CustomEvent. Could someone write a testcase which shows that this is specific to CustomEvents. (I believe this is dup of a bug where exceptions thrown from addEventListener-added listener aren't shown in the error console, or something like that. That bug is, IIRC, somewhere in XPConnect level)
No longer blocks: 427537
Summary: DOM3 CustomEvent listeners don't throw exceptions → Cascaded event listeners don't throw exceptions
(In reply to Olli Pettay [:smaug] from comment #4) > It is not clear to me this has anything to do with CustomEvent. You're right, not related with CustomEvent. It looks related to cascaded event listeners, see the new testcase.
Attachment #569693 - Attachment mime type: application/octet-stream → application/xhtml+xml
Stepping through this in gdb, it looks like the same problem as bug 503244. XPCWrappedJSClass::CheckForException calls the error reporter, which sees JS on the stack and doesn't report, then clears the pending exception.
Given that a patch for bug 503244 also fixes this bug, I'm calling this a duplicate. This is a helpful testcase though; thanks.
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 503244
You need to log in before you can comment on or make changes to this bug.