pub unsafe extern "C" fn JS_NewMaybeExternalString(
    cx: *mut JSContext,
    chars: *const u16,
    length: usize,
    callbacks: *const JSExternalStringCallbacks,
    allocatedExternal: *mut bool
) -> *mut JSString
Expand description

Create a new JSString whose chars member may refer to external memory. If a new external string is allocated, |*allocatedExternal| is set to true. Otherwise the returned string is either not an external string or an external string allocated by a previous call and |*allocatedExternal| is set to false. If |*allocatedExternal| is false, |fin| won’t be called.