Skip to main content

JS_GetOpaque

Function JS_GetOpaque 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn JS_GetOpaque( obj: JsValue, class_id: ClassId, ) -> *mut c_void
Expand description

JS_GetOpaque: the payload of obj when it is an instance of class_id.

The one place in this file that answers from somewhere other than a live object: while a finalizer runs there is no object left, so the value C was handed is a sentinel and the payload comes from the finalizer’s own frame. See crate::runtime.

§Safety

obj must be a live JSValue.