Confirmed using Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.9a1) Gecko/20051011 Firefox/1.6a1. Thanks for the simple testcase.
Assignee: nobody → events
Status: UNCONFIRMED → NEW
Component: General → DOM: Events
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → ian
Version: unspecified → Trunk
XPConnect issue -- nsXPCWrappedJSClass::CheckForException unsets the exception on the JS context and reports the error to the console, but the DOM script error reporter is never called...
Assignee: events → dbradley
Component: DOM: Events → XPConnect
OS: Windows XP → All
QA Contact: ian → pschwartau
Hardware: PC → All
QA Contact: pschwartau → xpconnect
Flags: blocking1.9a2? → blocking1.9-
So I looked into this a bit. The thing is... XPConnect overrides the JSContext exception reporter with xpcWrappedJSErrorReporter, which mostly does absolutely nothing. Why do we do that? I'd think that we'd actually want to report exceptions to the standard error reporter for the JSContext, no? Or are we trying to cover cases where JS calls into C++ which calls into JS and the outer JS wants to catch exceptions thrown on the inner JS? Given that we end up reporting in nsXPCWrappedJSClass::CallMethod after trying the JS_Invoke anyway, I don't think that's the case...
Yeah, we should fix this in 3.0.x if we can find a branch-safe way to do so. Honza: any progress to report? bz's comment 4 describes a somewhat-puzzling state of affairs!
Mike, I will probably not have much time now to work on this bug. But if there is not anyone other who could, reassign back to me.
I think we're past caring about this for 3.0.x, but if we want it anywhere it seems like it should be wanted for more recent releases.
Flags: wanted1.9.0.x+ → wanted1.9.1?
Confirmed that this doesn't work in Firefox 5.0.1 / Mac OS X 10.6 +1 vote to increase severity. Since most JS functions are triggered by events and handlers, this bug doesn't let us catch most errors. Especially relevant now that more and more browser-apps are turning into pure JS apps, and the need for error-reporting will only increase.
Created attachment 560383 [details] revised test case Tested Firefox 6.0.1 and (with this revised test case), and it looks like onerror is called properly.
Close this out?
Attachment #560383 - Attachment mime type: text/plain → text/html
Both test cases work for me in nightlies, so I think closing this is fine.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.