This article needs a technical review. How you can help.

Saves and restores frame chains.


JS_SaveFrameChain(JSContext *cx);

JS_RestoreFrameChain(JSContext *cx);
Name Type Description
cx JSContext * The context to query.


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.

See Also

Document Tags and Contributors

 Contributors to this page: fscholz, arai
 Last updated by: fscholz,