Errors within events triggered by .dispatchEvent are not shown in the Error Console

RESOLVED DUPLICATE of bug 503244

Status

()

Core
XPConnect
RESOLVED DUPLICATE of bug 503244
7 years ago
4 years ago

People

(Reporter: jorisvdwel, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(1 attachment)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.4) Gecko/20100611 Firefox/3.6.4

When an event is triggered by Node.dispatchEvent, any errors within that event are not shown in the Error Console or in firebug. They do however, show up in venkman (if I recall correctly venkman shows exceptions even if they are caught by try... catch).

Reproducible: Always

Steps to Reproduce:
1. Open the attached test case
2. Open the Error Console
3. Press "Trigger Error"
4. Press "Trigger Error (dispatchEvent)"
Actual Results:  
3. An alert is displayed AND an error is shown in the error console
4. An alert is displayed, but no error in the error console

Expected Results:  
4. Should display an alert AND an error in the error console
(Reporter)

Comment 1

7 years ago
Created attachment 454259 [details]
Test Case
Sounds like the usual XPConnect eating the exception when calling into a JS-implemented component (nsIDOMEventListener in this case) with JS on the stack....
Component: DOM: Events → XPConnect
QA Contact: events → xpconnect
Whiteboard: DUPEME
Just bumped into this issue yesterday. It still affects Firefox 4 nightly builds. I tested with Ubuntu Linux 64 bits, so I presume this issue is cross-platform.
Confirming per comment 3.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: x86 → All
Version: unspecified → Trunk

Comment 5

7 years ago
I don't know if this is important, but this is true for "throw"s as well as errors. Replace both "obj.bla.def = 5;" lines with "throw new Error('this is an error')" and the bug still occurs.

Comment 6

7 years ago
This is a duplicate of #503244

Updated

7 years ago
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 503244

Updated

4 years ago
Whiteboard: DUPEME
You need to log in before you can comment on or make changes to this bug.