]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/JSWrapperObject.cpp
JavaScriptCore-1097.3.3.tar.gz
[apple/javascriptcore.git] / runtime / JSWrapperObject.cpp
index 2c39f5c23849fee2affa194d4c6ee59399aba741..f8f5727d82cd67696226818eee790d9cd42d12aa 100644 (file)
 namespace JSC {
 
 ASSERT_CLASS_FITS_IN_CELL(JSWrapperObject);
+ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSWrapperObject);
 
-void JSWrapperObject::markChildren(MarkStack& markStack) 
+void JSWrapperObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
-    JSObject::markChildren(markStack);
-    if (m_internalValue)
-        markStack.append(m_internalValue);
+    JSWrapperObject* thisObject = jsCast<JSWrapperObject*>(cell);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
+    COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
+    ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
+    JSObject::visitChildren(thisObject, visitor);
+    if (thisObject->m_internalValue)
+        visitor.append(&thisObject->m_internalValue);
 }
 
 } // namespace JSC