LibJS: Add a [[Realm]] getter to FunctionObject and use it where needed

Defined by https://tc39.es/ecma262/#sec-ordinaryfunctioncreate step #17
and by https://tc39.es/ecma262/#sec-createbuiltinfunction step #6.
This commit is contained in:
Idan Horowitz 2021-06-30 17:54:47 +03:00 committed by Linus Groh
commit 5606332ed7
Notes: sideshowbarker 2024-07-18 11:11:49 +09:00
5 changed files with 11 additions and 3 deletions

View file

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