]> git.saurik.com Git - apple/javascriptcore.git/blobdiff - runtime/JSWrapperObject.cpp
JavaScriptCore-7600.1.4.9.tar.gz
[apple/javascriptcore.git] / runtime / JSWrapperObject.cpp
index 2c39f5c23849fee2affa194d4c6ee59399aba741..039dd6983117fd65283b34cec18b8e5254c18b72 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Copyright (C) 2006 Maks Orlovich
- *  Copyright (C) 2006, 2009 Apple, Inc.
+ *  Copyright (C) 2006, 2009, 2012 Apple, Inc.
  *
  *  This library is free software; you can redistribute it and/or
  *  modify it under the terms of the GNU Library General Public
 #include "config.h"
 #include "JSWrapperObject.h"
 
+#include "JSCInlines.h"
+
 namespace JSC {
 
-ASSERT_CLASS_FITS_IN_CELL(JSWrapperObject);
+STATIC_ASSERT_IS_TRIVIALLY_DESTRUCTIBLE(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, info());
+    COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
+    ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
+
+    JSObject::visitChildren(thisObject, visitor);
+    visitor.append(&thisObject->m_internalValue);
 }
 
 } // namespace JSC