Open
Bug 482137
Opened 16 years ago
Updated 2 years ago
XPConnect exceptions lose useful information by the time they get reported
Categories
(Core :: XPConnect, defect, P5)
Core
XPConnect
Tracking
()
NEW
People
(Reporter: bzbarsky, Unassigned)
References
(Depends on 1 open bug)
Details
This came up in bug 481552.
What happens here is that DOM code throws an error nsresult. XPConnect creates an nsIException object (which includes the method that was called(!) the filename, line number, etc). Then it asks the DOM error reporter for a better exception object, and gets back one that's equivalent but is missing the name of the method that was called. Then it JS-wrapes the object and calls JS_SetPendingException with it.
Now when we go to js_ReportUncaughtException, we call js_ErrorFromException, see that it's an object not of class js_ErrorClass, and henc don't create an error report from it. Then we go on to stringify the exception object, which dumps in the line and file information in string form, and report that string to the error console.
Issues:
1) I'm filing this under XPConnect, since it seems like XPConnect could make
this work if it created a js_ErrorClass object with a proper reportp. Is
that correct?
2) Can/should we usefully not clobber the xpconnect exception's info about
what method was being called?
3) If xpconnect can't make the JS engine behave reasonably here (e.g. can't
create js_ErrorClass objects), can we change the JS engine to somehow allow
a callback to get the JSErrorReport from an exception object?
![]() |
Reporter | |
Updated•14 years ago
|
Assignee: nobody → bzbarsky
OS: Mac OS X → All
Priority: -- → P1
Hardware: x86 → All
Comment 2•6 years ago
|
||
Decreasing the priority as no update for the last 2 years on this bug.
See https://github.com/mozilla/bug-handling/blob/master/policy/triage-bugzilla.md#how-do-you-triage
about the priority meaning.
Priority: P1 → P5
Updated•2 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•