Function js::jsapi::JS_Init
[−]
[src]
pub unsafe extern "C" fn JS_Init() -> bool
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/JS_ShutDown in that order, then doing so again). This restriction may eventually be lifted.