Add some assertions for exception handling
Categories
(Core :: JavaScript Engine, task)
Tracking
()
Tracking | Status | |
---|---|---|
firefox133 | --- | fixed |
People
(Reporter: jandem, Assigned: jandem)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
In bug 1921215 I added a cx->hadUncatchableException()
flag. We can also use this to assert that if a JSNative (or scripted function execution) returns false
, we're either throwing an exception or have reported an uncatchable exception. This helps catch some JSAPI footguns: see bug 552007 and bug 1408013.
Longer-term we should track uncatchable exceptions using the ExceptionStatus
enum because it's more precise, but this is a step in that direction.
Initially I'll probably only enable this for the JS shell, but if that's green we can see what happens in the browser.
Assignee | ||
Comment 1•5 days ago
|
||
If a JSNative or script execution returns false, we now assert we have a pending exception
or at some point an uncatchable exception was reported. Bug 1921215 added the hadUncatchableException_
flag to JSContext
.
For now enable this only in the JS shell. If that's green we can try enabling it everywhere.
Comment 3•4 days ago
|
||
bugherder |
Description
•