mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 18:37:35 +00:00
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:
parent
332946ab4f
commit
06e89311fa
8 changed files with 31 additions and 11 deletions
|
@ -118,7 +118,7 @@ GlobalObject* get_function_realm(GlobalObject& global_object, FunctionObject con
|
|||
// 2. If obj has a [[Realm]] internal slot, then
|
||||
if (function.realm()) {
|
||||
// a. Return obj.[[Realm]].
|
||||
return function.realm();
|
||||
return &function.global_object();
|
||||
}
|
||||
|
||||
// 3. If obj is a bound function exotic object, then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue