User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:18.104.22.168) Gecko/20100611 Firefox/3.6.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:22.214.171.124) 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
Sounds like the usual XPConnect eating the exception when calling into a JS-implemented component (nsIDOMEventListener in this case) with JS on the stack....
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.
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.
This is a duplicate of #503244