Function mozjs_sys::jsapi::JS::SetCreateGCSliceBudgetCallback

source ·
pub unsafe extern "C" fn SetCreateGCSliceBudgetCallback(
    cx: *mut JSContext,
    cb: CreateSliceBudgetCallback,
)
Expand description

Called when generating a GC slice budget. It allows the embedding to control the duration of slices and potentially check an interrupt flag as well. For internally triggered GCs, the given millis parameter is the JS engine’s internal scheduling decision, which the embedding can choose to ignore. (Otherwise, it will be the value that was passed to eg JS::IncrementalGCSlice()).