Re: Uncatchable exceptions
Boris Zbarsky <[email protected]>
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
On 5/3/16 12:33 AM, Ehsan Akhgari wrote: > So, for an embedder, is it possible to implement this by recording false > return values from JS APIs that can run code and then assume an > uncatchable exception if JS_IsExceptionPending() would be false? Yes. If you control all the calls into JS_* you can do that. Basically, store some state associated with the JSContext if false got returned and JS_IsExceptionPending is false. This should be doable with some sort of RAII helper that gets the jsapi result assigned into it, I'd thinkg. Then clear the state if you decide to call JS_ClearPendingException or whatever API you're implementing that clears uncatchable exceptions. -Boris