Type Alias mozjs_sys::jsapi::FreeTransferStructuredCloneOp
source · pub type FreeTransferStructuredCloneOp = Option<unsafe extern "C" fn(tag: u32, ownership: TransferableOwnership, content: *mut c_void, extraData: u64, closure: *mut c_void)>;
Expand description
Called when freeing a transferable handled by the embedding. Note that it should never trigger a garbage collection (and will assert in a debug build if it does.)
This callback will be used to release ownership in three situations:
-
During serialization: an object is Transferred from, then an error is encountered later and the incomplete serialization is discarded.
-
During deserialization: before an object is Transferred to, an error is encountered and the incompletely deserialized clone is discarded.
-
Serialized data that includes Transferring is never deserialized (eg when the receiver disappears before reading in the message), and the clone data is destroyed.
Aliased Type§
enum FreeTransferStructuredCloneOp {
None,
Some(unsafe extern "C" fn(_: u32, _: TransferableOwnership, _: *mut c_void, _: u64, _: *mut c_void)),
}