/*
* 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::visitChildren(SlotVisitor& visitor)
+void JSWrapperObject::visitChildren(JSCell* cell, SlotVisitor& visitor)
{
- ASSERT_GC_OBJECT_INHERITS(this, &s_info);
+ JSWrapperObject* thisObject = jsCast<JSWrapperObject*>(cell);
+ ASSERT_GC_OBJECT_INHERITS(thisObject, info());
COMPILE_ASSERT(StructureFlags & OverridesVisitChildren, OverridesVisitChildrenWithoutSettingFlag);
- ASSERT(structure()->typeInfo().overridesVisitChildren());
- JSObject::visitChildren(visitor);
- if (m_internalValue)
- visitor.append(&m_internalValue);
+ ASSERT(thisObject->structure()->typeInfo().overridesVisitChildren());
+
+ JSObject::visitChildren(thisObject, visitor);
+ visitor.append(&thisObject->m_internalValue);
}
} // namespace JSC