1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibJS: Fix crash due to AST node tracking inside call stack

This commit is contained in:
Jean-Baptiste Boric 2021-03-01 19:18:33 +01:00 committed by Andreas Kling
parent 74d1caf7d1
commit 6f668ca3a4
4 changed files with 6 additions and 5 deletions

View file

@ -900,7 +900,7 @@ Value Object::call_native_property_getter(NativeProperty& property, Value this_v
{
auto& vm = this->vm();
CallFrame call_frame;
call_frame.current_node = property.vm().node_stack().last();
call_frame.current_node = property.vm().current_node();
call_frame.is_strict_mode = vm.in_strict_mode();
call_frame.this_value = this_value;
vm.push_call_frame(call_frame, global_object());
@ -915,7 +915,7 @@ void Object::call_native_property_setter(NativeProperty& property, Value this_va
{
auto& vm = this->vm();
CallFrame call_frame;
call_frame.current_node = property.vm().node_stack().last();
call_frame.current_node = property.vm().current_node();
call_frame.is_strict_mode = vm.in_strict_mode();
call_frame.this_value = this_value;
vm.push_call_frame(call_frame, global_object());