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