X-Git-Url: https://git.saurik.com/apple/javascriptcore.git/blobdiff_plain/14957cd040308e3eeec43d26bae5d76da13fcd85..217a6308cd6a1dc049a0bb69263bd4c91f91c4d0:/runtime/JSWrapperObject.cpp diff --git a/runtime/JSWrapperObject.cpp b/runtime/JSWrapperObject.cpp index 8d6387e..01961a9 100644 --- a/runtime/JSWrapperObject.cpp +++ b/runtime/JSWrapperObject.cpp @@ -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 @@ -22,18 +22,21 @@ #include "config.h" #include "JSWrapperObject.h" +#include "Operations.h" + namespace JSC { -ASSERT_CLASS_FITS_IN_CELL(JSWrapperObject); +ASSERT_HAS_TRIVIAL_DESTRUCTOR(JSWrapperObject); -void JSWrapperObject::visitChildren(SlotVisitor& visitor) +void JSWrapperObject::visitChildren(JSCell* cell, SlotVisitor& visitor) { - ASSERT_GC_OBJECT_INHERITS(this, &s_info); + JSWrapperObject* thisObject = jsCast(cell); + ASSERT_GC_OBJECT_INHERITS(thisObject, &s_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