This article covers features introduced in SpiderMonkey 31
Initializes the JS engine so that further operations can be performed.
#include "js/Initialization.h" // previously "jsapi.h" bool JS_Init(void);
Initialize SpiderMonkey, returning true only if initialization succeeded. Once this method has succeeded, it is safe to call
JS_NewRuntime and other JSAPI methods.
This method must be called before any other JSAPI method is used on any thread. Once it has been used, it is safe to call any JSAPI method, and it remains safe to do so until
JS_ShutDown is correctly called.
It is currently not possible to initialize SpiderMonkey multiple times (that is, calling
JS_Init, JSAPI methods, then
JS_ShutDown in that order, then doing so again). This restriction may eventually be lifted.