mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 13:55:43 +00:00
Bug 617139: extend stack check further to allow for GC during exception generation for too much recursion, r=igor, a=blocker
This commit is contained in:
parent
698339e641
commit
340aa6ac81
9
js/src/jit-test/tests/basic/bug617139.js
Normal file
9
js/src/jit-test/tests/basic/bug617139.js
Normal file
@ -0,0 +1,9 @@
|
||||
// |jit-test| error: InternalError
|
||||
// don't assert
|
||||
|
||||
gczeal(2)
|
||||
function x() {
|
||||
[null].some(x)
|
||||
}
|
||||
x();
|
||||
|
@ -2524,10 +2524,10 @@ js_GC(JSContext *cx, JSGCInvocationKind gckind)
|
||||
# if JS_STACK_GROWTH_DIRECTION > 0
|
||||
/* cx->stackLimit is set to jsuword(-1) by default. */
|
||||
JS_ASSERT_IF(cx->stackLimit != jsuword(-1),
|
||||
JS_CHECK_STACK_SIZE(cx->stackLimit + 4096, &stackDummy));
|
||||
JS_CHECK_STACK_SIZE(cx->stackLimit + (1 << 14), &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));
|
||||
/* -16k because it is possible to perform a GC during an overrecursion report. */
|
||||
JS_ASSERT_IF(cx->stackLimit, JS_CHECK_STACK_SIZE(cx->stackLimit - (1 << 14), &stackDummy));
|
||||
# endif
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user