diff options
Diffstat (limited to 'JavaScriptCore/runtime/JSObject.cpp')
-rw-r--r-- | JavaScriptCore/runtime/JSObject.cpp | 31 |
1 files changed, 30 insertions, 1 deletions
diff --git a/JavaScriptCore/runtime/JSObject.cpp b/JavaScriptCore/runtime/JSObject.cpp index 57624fb..419dfe9 100644 --- a/JavaScriptCore/runtime/JSObject.cpp +++ b/JavaScriptCore/runtime/JSObject.cpp @@ -37,6 +37,26 @@ #include <math.h> #include <wtf/Assertions.h> +#define JSOBJECT_MARK_TRACING 0 + +#if JSOBJECT_MARK_TRACING + +#define JSOBJECT_MARK_BEGIN() \ + static int markStackDepth = 0; \ + for (int i = 0; i < markStackDepth; i++) \ + putchar('-'); \ + printf("%s (%p)\n", className().UTF8String().c_str(), this); \ + markStackDepth++; \ + +#define JSOBJECT_MARK_END() \ + markStackDepth--; + +#else // JSOBJECT_MARK_TRACING + +#define JSOBJECT_MARK_BEGIN() +#define JSOBJECT_MARK_END() + +#endif // JSOBJECT_MARK_TRACING namespace JSC { @@ -44,7 +64,16 @@ ASSERT_CLASS_FITS_IN_CELL(JSObject); void JSObject::markChildren(MarkStack& markStack) { - markChildrenDirect(markStack); + JSOBJECT_MARK_BEGIN(); + + JSCell::markChildren(markStack); + m_structure->markAggregate(markStack); + + PropertyStorage storage = propertyStorage(); + size_t storageSize = m_structure->propertyStorageSize(); + markStack.appendValues(reinterpret_cast<JSValue*>(storage), storageSize); + + JSOBJECT_MARK_END(); } UString JSObject::className() const |