This article needs a technical review. How you can help.
Saves and restores frame chains.
Syntax
bool JS_SaveFrameChain(JSContext *cx); void JS_RestoreFrameChain(JSContext *cx);
Name | Type | Description |
---|---|---|
cx |
|
The context to query. |
Description
These two functions are used to set aside cx
's call stack while that stack is inactive. After a call to JS_SaveFrameChain
, it looks as if there is no code running on cx
. Before calling JS_RestoreFrameChain
, cx
's call stack must be balanced and all nested calls to JS_SaveFrameChain
must have had matching JS_RestoreFrameChain
calls.
JS_SaveFrameChain
deals with cx not having any code running on it.