This article needs a technical review. How you can help.
This article covers features introduced in SpiderMonkey 31
Save and later restore the current exception state of a given
||Pointer to a JS context from which to derive runtime information. Requires request. In a
JS::AutoSaveExceptionState saves and later restores the current exception state of a given
This is useful for implementing behavior in C++ that's like
try/finally in JS.
// Typical usage: bool ok = JS::Evaluate(cx, ...); AutoSaveExceptionState savedExc(cx); ... cleanup that might re-enter JS ... return ok;