@@ -1489,7 +1489,8 @@ JSValue JS_CallInternal(JSContext* caller_ctx,
1489
1489
ic -> updated = FALSE;
1490
1490
put_u8 (pc - 5 , OP_get_field_ic );
1491
1491
put_u32 (pc - 4 , ic -> updated_offset );
1492
- JS_FreeAtom (ctx , atom );
1492
+ // safe free call because ic struct will retain atom
1493
+ JS_FreeAtom (ic -> ctx , atom );
1493
1494
}
1494
1495
JS_FreeValue (ctx , sp [-1 ]);
1495
1496
sp [-1 ] = val ;
@@ -1526,7 +1527,8 @@ JSValue JS_CallInternal(JSContext* caller_ctx,
1526
1527
ic -> updated = FALSE;
1527
1528
put_u8 (pc - 5 , OP_get_field2_ic );
1528
1529
put_u32 (pc - 4 , ic -> updated_offset );
1529
- JS_FreeAtom (ctx , atom );
1530
+ // safe free call because ic struct will retain atom
1531
+ JS_FreeAtom (ic -> ctx , atom );
1530
1532
}
1531
1533
* sp ++ = val ;
1532
1534
}
@@ -1563,7 +1565,8 @@ JSValue JS_CallInternal(JSContext* caller_ctx,
1563
1565
ic -> updated = FALSE;
1564
1566
put_u8 (pc - 5 , OP_put_field_ic );
1565
1567
put_u32 (pc - 4 , ic -> updated_offset );
1566
- JS_FreeAtom (ctx , atom );
1568
+ // safe free call because ic struct will retain atom
1569
+ JS_FreeAtom (ic -> ctx , atom );
1567
1570
}
1568
1571
}
1569
1572
BREAK ;
0 commit comments