Changes for spidermomkey upgrade.

This commit is contained in:
Josh Matthews 2022-11-20 00:34:37 -05:00
parent f1bb3dcad0
commit bd77a4043c
16 changed files with 245 additions and 186 deletions

View file

@ -52,7 +52,7 @@ use js::jsapi::StreamConsumer as JSStreamConsumer;
use js::jsapi::{BuildIdCharVector, DisableIncrementalGC, GCDescription, GCProgress};
use js::jsapi::{Dispatchable as JSRunnable, Dispatchable_MaybeShuttingDown};
use js::jsapi::{
GCReason, JSGCInvocationKind, JSGCStatus, JS_AddExtraGCRootsTracer,
GCReason, GCOptions, JSGCStatus, JS_AddExtraGCRootsTracer,
JS_RequestInterruptCallback, JS_SetGCCallback,
};
use js::jsapi::{HandleObject, Heap, JobQueue};
@ -791,13 +791,14 @@ unsafe extern "C" fn gc_slice_callback(
};
if !desc.is_null() {
let desc: &GCDescription = &*desc;
let invocation_kind = match desc.invocationKind_ {
JSGCInvocationKind::GC_NORMAL => "GC_NORMAL",
JSGCInvocationKind::GC_SHRINK => "GC_SHRINK",
};
let options = match desc.options_ {
GCOptions::Normal => "Normal",
GCOptions::Shrink => "Shrink",
GCOptions::Shutdown => "Shutdown",
};
println!(
" isZone={}, invocation_kind={}",
desc.isZone_, invocation_kind
" isZone={}, options={}",
desc.isZone_, options
);
}
let _ = stdout().flush();