void JSDOMGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
    JSDOMGlobalObject* thisObject = jsCast<JSDOMGlobalObject*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
    COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
    ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
    Base::visitChildren(thisObject, visitor);

    JSDOMStructureMap::iterator end = thisObject->structures().end();
    for (JSDOMStructureMap::iterator it = thisObject->structures().begin(); it != end; ++it)
        visitor.append(&it->value);

    JSDOMConstructorMap::iterator end2 = thisObject->constructors().end();
    for (JSDOMConstructorMap::iterator it2 = thisObject->constructors().begin(); it2 != end2; ++it2)
        visitor.append(&it2->value);
}
示例#2
0
void JSDOMGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
    JSDOMGlobalObject* thisObject = jsCast<JSDOMGlobalObject*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    Base::visitChildren(thisObject, visitor);

    for (auto& structure : thisObject->structures().values())
        visitor.append(&structure);

    for (auto& constructor : thisObject->constructors().values())
        visitor.append(&constructor);

    thisObject->m_builtinInternalFunctions.visit(visitor);
}
示例#3
0
void JSDOMGlobalObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
    JSDOMGlobalObject* thisObject = jsCast<JSDOMGlobalObject*>(cell);
    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    Base::visitChildren(thisObject, visitor);
    
    {
        auto locker = holdLock(thisObject->m_gcLock);
        
        for (auto& structure : thisObject->structures(locker).values())
            visitor.append(&structure);
        
        for (auto& constructor : thisObject->constructors(locker).values())
            visitor.append(&constructor);
        
        for (auto& deferredPromise : thisObject->deferredPromises(locker))
            deferredPromise->visitAggregate(visitor);
    }

    thisObject->m_builtinInternalFunctions.visit(visitor);
}