Closed
Bug 589308
Opened 14 years ago
Closed 3 years ago
Jetpack child process doesn't report errors outside of registerReceiver() callbacks
Categories
(Core :: DOM: Content Processes, defect, P5)
Tracking
()
RESOLVED
WORKSFORME
People
(Reporter: avarma, Unassigned)
Details
If the main body of a script executed via nsIJetpack.evalScript() throws an exception that isn't caught, it isn't reported as an error via a "core:exception" message.
Looking at the source code, it seems like this is a result of the JSOPTION_DONT_REPORT_UNCAUGHT option being set on the context running JS in the Jetpack child process and the fact that JetpackChild::RecvEvalScript() isn't checking the return value of JS_EvaluateUCScript() and calling JS_ReportPendingException() if it's failed. I could be wrong, though.
This bug also has a workaround, in that the whole script that's executed can just be surrounded by a try ... catch.
Comment 1•13 years ago
|
||
Comparing JetpackChild::RecvEvalScript with JetpackActorCommon::RecvMessage (which *does* throw an exception) it seems as if it is enough to just check the return value of JS_EvaluateUCScript and call JS_ReportPendingException, as Atul suggested.
I have tried this out and it looks as if this does indeed solve the problem.
Updated•10 years ago
|
Component: IPC → DOM: Content Processes
Comment 2•6 years ago
|
||
https://bugzilla.mozilla.org/show_bug.cgi?id=1472046
Move all DOM bugs that haven’t been updated in more than 3 years and has no one currently assigned to P5.
If you have questions, please contact :mdaly.
Priority: -- → P5
Comment 3•3 years ago
|
||
(In reply to Eddy Bruel [:ejpbruel] from comment #1)
Comparing JetpackChild::RecvEvalScript with JetpackActorCommon::RecvMessage
(which does throw an exception) it seems as if it is enough to just check
the return value of JS_EvaluateUCScript and call JS_ReportPendingException,
as Atul suggested.I have tried this out and it looks as if this does indeed solve the problem.
So the problem is solved (and IIUC jetpack has gone entirely).
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WORKSFORME
You need to log in
before you can comment on or make changes to this bug.
Description
•