File tree 1 file changed +3
-5
lines changed
1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 7
7
8
8
#define MAX_TIME 10
9
9
10
- static int timeout_interrupt_handler (JSRuntime * rt , void * opaque )
10
+ static int timeout_interrupt_handler (JSRuntime * rt , void * opaque )
11
11
{
12
12
int * time = (int * )opaque ;
13
13
if (* time <= MAX_TIME )
@@ -17,7 +17,7 @@ static int timeout_interrupt_handler(JSRuntime *rt, void *opaque)
17
17
18
18
static void sync_call (void )
19
19
{
20
- const char * code =
20
+ const char * code =
21
21
"(function() { \
22
22
try { \
23
23
while (true) {} \
@@ -42,7 +42,7 @@ static void sync_call(void)
42
42
43
43
static void async_call (void )
44
44
{
45
- const char * code =
45
+ const char * code =
46
46
"(async function() { \
47
47
const loop = async () => { \
48
48
await Promise.resolve(); \
@@ -96,8 +96,6 @@ static void async_call_stack_overflow(void)
96
96
97
97
JSRuntime * rt = JS_NewRuntime ();
98
98
JSContext * ctx = JS_NewContext (rt );
99
- JS_SetMaxStackSize (rt , 128 * 1024 );
100
- JS_UpdateStackTop (rt );
101
99
JSValue value = JS_UNDEFINED ;
102
100
JS_SetContextOpaque (ctx , & value );
103
101
JSValue global = JS_GetGlobalObject (ctx );
You can’t perform that action at this time.
0 commit comments