Function mozjs_sys::jsapi::JS::CompileUtf8Path

source ·
pub unsafe extern "C" fn CompileUtf8Path(
    cx: *mut JSContext,
    options: *const ReadOnlyCompileOptions,
    filename: *const c_char,
) -> *mut JSScript
Expand description

Compile the UTF-8 contents of the file at the given path into a script. (The path itself is in the system encoding, not [necessarily] UTF-8.) It is an error if the file’s contents are invalid UTF-8. Return the script on success, or return null on failure (usually with an error reported).