mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:45:07 +00:00
LibJS: Set OrdinaryFunctionObject's realm from the Tnterpreter
...instead of relying on the VM having a current execution context. This was an incorrect assumption I made, and it caused onfoo attribute handler construction in LibWeb to crash. Just use the same mechanism as NativeFunction in the meantime.
This commit is contained in:
parent
a46b0fc1ff
commit
4f362fc703
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ OrdinaryFunctionObject::OrdinaryFunctionObject(GlobalObject& global_object, cons
|
|||
, m_body(body)
|
||||
, m_parameters(move(parameters))
|
||||
, m_environment(parent_scope)
|
||||
, m_realm(vm().current_realm())
|
||||
, m_realm(vm().interpreter_if_exists() ? &vm().interpreter().realm() : nullptr)
|
||||
, m_function_length(function_length)
|
||||
, m_kind(kind)
|
||||
, m_is_strict(is_strict)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue