LibJS: Interpreter::this_value() => this_value(GlobalObject&)

Once the Interpreter has no global object attached to it, we have to
provide it everywhere.
This commit is contained in:
Andreas Kling 2020-06-08 21:10:22 +02:00
commit 053863f35e
Notes: sideshowbarker 2024-07-19 05:44:47 +09:00
25 changed files with 78 additions and 73 deletions

View file

@ -150,10 +150,10 @@ public:
return index < arguments.size() ? arguments[index] : js_undefined();
}
Value this_value() const
Value this_value(Object& global_object) const
{
if (m_call_stack.is_empty())
return m_global_object;
return &global_object;
return m_call_stack.last().this_value;
}