Report strict errors for runtime exceptions from event listeners

RESOLVED DUPLICATE of bug 503244

Status

()

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

People

(Reporter: Mardak, Unassigned)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

7 years ago
It seems like exceptions from some addEventListener-listeners are eaten. This is unfortunate for strict mode where one feature is to convert mistakes into errors, e.g., ReferenceError, but the exception doesn't make it to the Error Console.

In particular, I run into this when listening for "TabSelect" on a tab and "command" on a xul:textbox.

("keydown" on the xul:textbox will correctly report "Error: uncaught exception: ReferenceError: assignment to undeclared variable foo")
We have the ability to detect exceptions thrown from listeners now, too. Look for NS_EVENT_FLAG_EXCEPTION_THROWN.

Comment 2

5 years ago
This does not report error in my case:

li.addEventListener("DOMAttrModified", function(){
	xxx.yyy();//xxx===undefined
	…
}
Status: NEW → RESOLVED
Last Resolved: 5 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.