]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/GetterSetter.cpp
JavaScriptCore-1097.13.tar.gz
[apple/javascriptcore.git] / runtime / GetterSetter.cpp
index 7e54053f96cce73b5560a82e5e810e1e5d280f6c..920399dda3f38bf8771ee505f66d194bdde9c5d9 100644 (file)
 
 namespace JSC {
 
-void GetterSetter::markChildren(MarkStack& markStack)
-{
-    JSCell::markChildren(markStack);
+ASSERT_HAS_TRIVIAL_DESTRUCTOR(GetterSetter);
 
-    if (m_getter)
-        markStack.append(m_getter);
-    if (m_setter)
-        markStack.append(m_setter);
-}
+const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0, CREATE_METHOD_TABLE(GetterSetter) };
 
-bool GetterSetter::isGetterSetter() const
+void GetterSetter::visitChildren(JSCell* cell, SlotVisitor& visitor)
 {
-    return true;
+    GetterSetter* thisObject = jsCast<GetterSetter*>(cell);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, &s_info);
+    ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
+    JSCell::visitChildren(thisObject, visitor);
+
+    if (thisObject->m_getter)
+        visitor.append(&thisObject->m_getter);
+    if (thisObject->m_setter)
+        visitor.append(&thisObject->m_setter);
 }
 
 } // namespace JSC