Пример #1
0
void
StoreBuffer::GenericBuffer::mark(JSTracer *trc)
{
    uint8_t *p = base;
    while (p < pos) {
        unsigned size = *((unsigned *)p);
        p += sizeof(unsigned);

        BufferableRef *edge = reinterpret_cast<BufferableRef *>(p);
        edge->mark(trc);

        p += size;
    }
}
Пример #2
0
void
StoreBuffer::GenericBuffer::mark(StoreBuffer* owner, JSTracer* trc)
{
    ReentrancyGuard g(*owner);
    MOZ_ASSERT(owner->isEnabled());
    if (!storage_)
        return;

    for (LifoAlloc::Enum e(*storage_); !e.empty();) {
        unsigned size = *e.get<unsigned>();
        e.popFront<unsigned>();
        BufferableRef* edge = e.get<BufferableRef>(size);
        edge->mark(trc);
        e.popFront(size);
    }
}