Skip to main content

JS_GetOwnPropertyNames

Function JS_GetOwnPropertyNames 

Source
#[unsafe(no_mangle)]
pub unsafe extern "C" fn JS_GetOwnPropertyNames( ctx: *mut JsContext, ptab: *mut *mut JSPropertyEnum, plen: *mut u32, obj: JsValue, flags: c_int, ) -> c_int
Expand description

JS_GetOwnPropertyNames: ptab/plen filled with the object’s own keys.

The block is one allocation holding len JSPropertyEnums, so JS_FreePropertyEnum(ctx, tab, len) can release it as one — which is what the reference does and what every caller assumes.

§Safety

ptab and plen must be writable, obj a live JSValue.