1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 14:28:12 +00:00

LibJS: Keep track of current AST node inside the call stack

This commit is contained in:
Jean-Baptiste Boric 2021-02-28 10:45:26 +01:00 committed by Andreas Kling
parent 0039ecb189
commit 6172cb3599
5 changed files with 10 additions and 1 deletions

View file

@ -900,6 +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.is_strict_mode = vm.in_strict_mode();
call_frame.this_value = this_value;
vm.push_call_frame(call_frame, global_object());
@ -914,6 +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.is_strict_mode = vm.in_strict_mode();
call_frame.this_value = this_value;
vm.push_call_frame(call_frame, global_object());