]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/GetterSetter.cpp
JavaScriptCore-1097.13.tar.gz
[apple/javascriptcore.git] / runtime / GetterSetter.cpp
index 04193ea3d5314c2239c152fa607ce5adc0fe4ebd..920399dda3f38bf8771ee505f66d194bdde9c5d9 100644 (file)
 
 namespace JSC {
 
-const ClassInfo GetterSetter::s_info = { "GetterSetter", 0, 0, 0 };
+ASSERT_HAS_TRIVIAL_DESTRUCTOR(GetterSetter);
 
-void GetterSetter::visitChildren(SlotVisitor& visitor)
-{
-    ASSERT_GC_OBJECT_INHERITS(this, &s_info);
-    ASSERT(structure()->typeInfo().overridesVisitChildren());
-    JSCell::visitChildren(visitor);
-
-    if (m_getter)
-        visitor.append(&m_getter);
-    if (m_setter)
-        visitor.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