Mercurial > spidermonkey-playground
diff spidermonkey-playground.cpp @ 63:4910bc49a182
set GC Zeal to 2 and fixed some bugs exposed by it.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Thu, 25 Jun 2009 11:39:32 -0700 |
parents | 0b66a265df13 |
children | 6a7e87cd1588 |
line wrap: on
line diff
--- a/spidermonkey-playground.cpp Thu Jun 25 10:48:47 2009 -0700 +++ b/spidermonkey-playground.cpp Thu Jun 25 11:39:32 2009 -0700 @@ -229,6 +229,8 @@ static JSBool stack(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval) { + JSAutoLocalRootScope autoScope(cx); + JSStackFrame *iterator = NULL; JSStackFrame *frame; JSObject *prevFrameInfo = NULL; @@ -413,6 +415,10 @@ JS_BeginRequest(tcb_cx); +#ifdef DEBUG + JS_SetGCZeal(tcb_cx, 2); +#endif + /* Create the TCB's global object. */ tcb_global = JS_NewObject(tcb_cx, &global_class, NULL, NULL); if (tcb_global == NULL)