void MarkCrossCompartmentSlot(JSTracer *trc, HeapSlot *s, const char *name) { if (s->isMarkable()) { Cell *cell = (Cell *)s->toGCThing(); if (IS_GC_MARKING_TRACER(trc) && !cell->compartment()->isCollecting()) return; MarkSlot(trc, s, name); } }
void MarkCrossCompartmentSlot(JSTracer *trc, HeapSlot *s, const char *name) { if (s->isMarkable()) { Cell *cell = (Cell *)s->toGCThing(); JSRuntime *rt = trc->runtime; if (rt->gcCurrentCompartment && cell->compartment() != rt->gcCurrentCompartment) return; /* In case we're called from a write barrier. */ if (rt->gcIncrementalCompartment && cell->compartment() != rt->gcIncrementalCompartment) return; MarkSlot(trc, s, name); } }