Skip to main content

JS_NewContextRaw

Function JS_NewContextRaw 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn JS_NewContextRaw( rt: *mut JsRuntime, ) -> *mut JsContext
Expand description

JS_NewContextRaw: a context with no intrinsics installed.

The engine installs its builtins when it builds an interpreter, at which point a context has an interpreter and the intrinsic set is no longer a choice. So this is JS_NewContext: a raw context here still has Object and Array. A caller that wanted the reduced context must not use this library; the README says so next to JS_AddIntrinsicIntl.

ยงSafety

rt must be a live runtime.