LibJS: Set the callee context's realm in prepare_for_ordinary_call()

This includes making FunctionObject::realm() actually return a Realm,
instead of a GlobalObject.
This commit is contained in:
Linus Groh 2021-09-11 21:42:01 +01:00
commit 06e89311fa
Notes: sideshowbarker 2024-07-18 22:57:59 +09:00
8 changed files with 31 additions and 11 deletions

View file

@ -43,7 +43,7 @@ OrdinaryFunctionObject::OrdinaryFunctionObject(GlobalObject& global_object, cons
, m_body(body)
, m_parameters(move(parameters))
, m_environment(parent_scope)
, m_realm(&global_object)
, m_realm(vm().current_realm())
, m_function_length(function_length)
, m_kind(kind)
, m_is_strict(is_strict)