mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:47:34 +00:00
LibJS: Fix crash due to AST node tracking inside call stack
This commit is contained in:
parent
74d1caf7d1
commit
6f668ca3a4
4 changed files with 6 additions and 5 deletions
|
@ -211,7 +211,7 @@ Reference VM::get_reference(const FlyString& name)
|
|||
Value VM::construct(Function& function, Function& new_target, Optional<MarkedValueList> arguments, GlobalObject& global_object)
|
||||
{
|
||||
CallFrame call_frame;
|
||||
call_frame.current_node = function.vm().node_stack().last();
|
||||
call_frame.current_node = current_node();
|
||||
call_frame.is_strict_mode = function.is_strict_mode();
|
||||
|
||||
push_call_frame(call_frame, function.global_object());
|
||||
|
@ -335,7 +335,7 @@ Value VM::call_internal(Function& function, Value this_value, Optional<MarkedVal
|
|||
VERIFY(!exception());
|
||||
|
||||
CallFrame call_frame;
|
||||
call_frame.current_node = function.vm().node_stack().last();
|
||||
call_frame.current_node = current_node();
|
||||
call_frame.is_strict_mode = function.is_strict_mode();
|
||||
call_frame.function_name = function.name();
|
||||
call_frame.this_value = function.bound_this().value_or(this_value);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue