Skip to content

Commit 55c06f1

Browse files
committed
Remove explicit stack size from api-test
Let it overflow.
1 parent 2257414 commit 55c06f1

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

api-test.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#define MAX_TIME 10
1010

11-
static int timeout_interrupt_handler(JSRuntime *rt, void *opaque)
11+
static int timeout_interrupt_handler(JSRuntime *rt, void *opaque)
1212
{
1313
int *time = (int *)opaque;
1414
if (*time <= MAX_TIME)
@@ -18,7 +18,7 @@ static int timeout_interrupt_handler(JSRuntime *rt, void *opaque)
1818

1919
static void sync_call(void)
2020
{
21-
const char *code =
21+
const char *code =
2222
"(function() { \
2323
try { \
2424
while (true) {} \
@@ -43,7 +43,7 @@ static void sync_call(void)
4343

4444
static void async_call(void)
4545
{
46-
const char *code =
46+
const char *code =
4747
"(async function() { \
4848
const loop = async () => { \
4949
await Promise.resolve(); \
@@ -97,8 +97,6 @@ static void async_call_stack_overflow(void)
9797

9898
JSRuntime *rt = JS_NewRuntime();
9999
JSContext *ctx = JS_NewContext(rt);
100-
JS_SetMaxStackSize(rt, 128 * 1024);
101-
JS_UpdateStackTop(rt);
102100
JSValue value = JS_UNDEFINED;
103101
JS_SetContextOpaque(ctx, &value);
104102
JSValue global = JS_GetGlobalObject(ctx);

0 commit comments

Comments
 (0)