pub unsafe extern "system" fn JsSetObjectBeforeCollectCallback(
ref_: JsRef,
callbackState: *mut c_void,
objectBeforeCollectCallback: JsObjectBeforeCollectCallback
) -> JsErrorCode
Sets a callback function that is called by the runtime before garbage collection of
an object.
The callback is invoked on the current runtime execution thread, therefore execution is
blocked until the callback completes.
The object for which to register the callback.
User provided state that will be passed back to the callback.
The callback function being set. Use null to clear
previously registered callback.
The code JsNoError if the operation succeeded, a failure code otherwise.