From 27a81f5957b8caed9724c0156208b401523b57bc Mon Sep 17 00:00:00 2001 From: Gregor Wagner Date: Tue, 19 Oct 2010 16:12:08 -0700 Subject: [PATCH] Followup for Bug 605011 --- js/src/jsgc.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp index bdd8d0f799e3..0313d486d976 100644 --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -2564,8 +2564,9 @@ js_GC(JSContext *cx, JSGCInvocationKind gckind) #ifdef DEBUG int stackDummy; # if JS_STACK_GROWTH_DIRECTION > 0 - /* cx->stackLimit is set to jsuword(-1). */ - JS_ASSERT_IF(cx->stackLimit, JS_CHECK_STACK_SIZE(cx->stackLimit, &stackDummy)); + /* cx->stackLimit is set to jsuword(-1) by default. */ + JS_ASSERT_IF(cx->stackLimit != jsuword(-1), + JS_CHECK_STACK_SIZE(cx->stackLimit + 4096, &stackDummy)); # else /* -4k because it is possible to perform a GC during an overrecursion report. */ JS_ASSERT_IF(cx->stackLimit, JS_CHECK_STACK_SIZE(cx->stackLimit - 4096, &stackDummy));