pub unsafe extern "C" fn SetCreateGCSliceBudgetCallback(
    cx: *mut JSContext,
    cb: Option<unsafe extern "C" fn(_: GCReason, _: i64) -> SliceBudget>
)
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()).