mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1166944 - Inline the only user of TraceObjectSlots; r=jonco
This commit is contained in:
parent
1ea581170f
commit
967c6efcdd
@ -528,18 +528,6 @@ js::TraceProcessGlobalRoot(JSTracer* trc, T* thing, const char* name)
|
||||
template void js::TraceProcessGlobalRoot<JSAtom>(JSTracer*, JSAtom*, const char*);
|
||||
template void js::TraceProcessGlobalRoot<JS::Symbol>(JSTracer*, JS::Symbol*, const char*);
|
||||
|
||||
void
|
||||
js::TraceObjectSlots(JSTracer* trc, NativeObject* obj, uint32_t start, uint32_t nslots)
|
||||
{
|
||||
JS::AutoTracingIndex index(trc, start);
|
||||
for (uint32_t i = start; i < (start + nslots); ++i) {
|
||||
HeapSlot& slot = obj->getSlotRef(i);
|
||||
if (InternalGCMethods<Value>::isMarkable(slot))
|
||||
DispatchToTracer(trc, slot.unsafeGet(), "object slot");
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
||||
// A typed functor adaptor for TraceRoot.
|
||||
struct TraceRootFunctor {
|
||||
template <typename T>
|
||||
|
@ -109,11 +109,6 @@ TraceGenericPointerRoot(JSTracer* trc, gc::Cell** thingp, const char* name);
|
||||
void
|
||||
TraceManuallyBarrieredGenericPointerEdge(JSTracer* trc, gc::Cell** thingp, const char* name);
|
||||
|
||||
// Object slots are not stored as a contiguous vector, so marking them as such
|
||||
// will lead to the wrong indicies, if such are requested when tracing.
|
||||
void
|
||||
TraceObjectSlots(JSTracer* trc, NativeObject* obj, uint32_t start, uint32_t nslots);
|
||||
|
||||
// Depricated. Please use one of the strongly typed variants above.
|
||||
void
|
||||
TraceChildren(JSTracer* trc, void* thing, JSGCTraceKind kind);
|
||||
|
@ -4113,7 +4113,11 @@ JSObject::traceChildren(JSTracer* trc)
|
||||
{
|
||||
GetObjectSlotNameFunctor func(nobj);
|
||||
JS::AutoTracingDetails ctx(trc, func);
|
||||
TraceObjectSlots(trc, nobj, 0, nobj->slotSpan());
|
||||
JS::AutoTracingIndex index(trc);
|
||||
for (uint32_t i = 0; i < nobj->slotSpan(); ++i) {
|
||||
TraceManuallyBarrieredEdge(trc, nobj->getSlotRef(i).unsafeGet(), "object slot");
|
||||
++index;
|
||||
}
|
||||
}
|
||||
|
||||
do {
|
||||
|
Loading…
Reference in New Issue
Block a user