Function mozjs::jsapi::MaybeGetScriptPrivate

source ยท
pub unsafe extern "C" fn MaybeGetScriptPrivate(
    object: *mut JSObject,
) -> Value
Expand description

Get the script private value associated with an object, if any.

The private value is set with SetScriptPrivate() or SetModulePrivate() and is internally stored on the relevant ScriptSourceObject.

This is used by the cycle collector to trace through ScriptSourceObjects. This allows private values to contain an nsISupports pointer and hence support references to cycle collected C++ objects.