diff options
author | Linus Groh <mail@linusgroh.de> | 2021-09-11 21:42:01 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-09-12 11:10:20 +0100 |
commit | 06e89311fa0d09ac0b0a6bf4ea9b75773ac5d2df (patch) | |
tree | 60bb92eb4900fc2a752713fbb8a5c99fa0dfa268 /Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp | |
parent | 332946ab4f77a16de6be7f9148817938c00e7ddd (diff) | |
download | serenity-06e89311fa0d09ac0b0a6bf4ea9b75773ac5d2df.zip |
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.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp index dcf28a1cbb..640325a1d2 100644 --- a/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp +++ b/Userland/Libraries/LibJS/Runtime/AbstractOperations.cpp @@ -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 |