Function mozjs::jsapi::JS_IterateCompartments
source ยท pub unsafe extern "C" fn JS_IterateCompartments(
cx: *mut JSContext,
data: *mut c_void,
compartmentCallback: Option<unsafe extern "C" fn(_: *mut JSContext, _: *mut c_void, _: *mut Compartment) -> CompartmentIterResult>,
)
Expand description
This function calls |compartmentCallback| on every compartment until either all compartments have been iterated or CompartmentIterResult::Stop is returned. Beware that there is no guarantee that the compartment will survive after the callback returns. Also, barriers are disabled via the TraceSession.