Commit 01c2b8cb authored by bdash's avatar bdash

2007-01-18 Sanjay Madhav <sanjay12@gmail.com>

        Reviewed by Darin.

        Add JavaScriptCore define to help with tracing of when objects are marked.

        * kjs/object.cpp:
        (KJS::JSObject::mark):


git-svn-id: svn://svn.chromium.org/blink/trunk@18963 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent d36a4958
2007-01-18 Sanjay Madhav <sanjay12@gmail.com>
Reviewed by Darin.
Add JavaScriptCore define to help with tracing of when objects are marked.
* kjs/object.cpp:
(KJS::JSObject::mark):
2007-01-18 Simon Hausmann <hausmann@kde.org> 2007-01-18 Simon Hausmann <hausmann@kde.org>
Reviewed by Zack. Reviewed by Zack.
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
#endif #endif
#define JAVASCRIPT_CALL_TRACING 0 #define JAVASCRIPT_CALL_TRACING 0
#define JAVASCRIPT_MARK_TRACING 0
#if JAVASCRIPT_CALL_TRACING #if JAVASCRIPT_CALL_TRACING
static bool _traceJavaScript = false; static bool _traceJavaScript = false;
...@@ -118,11 +119,24 @@ void JSObject::mark() ...@@ -118,11 +119,24 @@ void JSObject::mark()
{ {
JSCell::mark(); JSCell::mark();
#if JAVASCRIPT_MARK_TRACING
static int markStackDepth = 0;
markStackDepth++;
for (int i = 0; i < markStackDepth; i++)
putchar('-');
printf("%s (%p)\n", className().UTF8String().c_str(), this);
#endif
JSValue *proto = _proto; JSValue *proto = _proto;
if (!proto->marked()) if (!proto->marked())
proto->mark(); proto->mark();
_prop.mark(); _prop.mark();
#if JAVASCRIPT_MARK_TRACING
markStackDepth--;
#endif
} }
JSType JSObject::type() const JSType JSObject::type() const
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment