Open Bug 677808 Opened 14 years ago Updated 5 months ago

Implement uncaughtExceptionHook spec behavior when the hook throws an exception

Categories

(Core :: JavaScript Engine, task, P5)

Other Branch
x86
macOS
task

Tracking

()

People

(Reporter: jorendorff, Unassigned)

References

(Blocks 1 open bug)

Details

(Whiteboard: clownshoes)

If a debugging hook throws an exception and the uncaughtExceptionHook is null, or it also throws an error, we don't do what the spec says: https://wiki.mozilla.org/Debugger#Accessor_Properties_of_the_Debugger_Prototype_Object
Whiteboard: clownshoes
Assignee: general → nobody
Severity: normal → S3

We do have Debugger::reportUncaughtException(), but it doesn't look like it is called everywhere that Debugger::callUncaughtExceptionHandler() is called.

The behavior in the spec that appears to be missing is:

If the uncaught exception hook itself throws an exception, uncaught-hook-exception, SpiderMonkey throws a new error object, confess-to-debuggee-exception, to the debuggee whose message blames the debugger, and includes textual descriptions of uncaught-hook-exception and the original debugger-exception.

If uncaughtExceptionHook’s value is null, SpiderMonkey throws an exception to the debuggee whose message blames the debugger, and includes a textual description of debugger-exception.

Blocks: js-debugger
Priority: -- → P5
Summary: [jsdbg2] implement uncaughtExceptionHook spec behavior in clownshoes case → Implement uncaughtExceptionHook spec behavior when the hook throws an exception
Type: defect → task
You need to log in before you can comment on or make changes to this bug.