summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/FunctionObject.h
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2021-09-11 21:42:01 +0100
committerLinus Groh <mail@linusgroh.de>2021-09-12 11:10:20 +0100
commit06e89311fa0d09ac0b0a6bf4ea9b75773ac5d2df (patch)
tree60bb92eb4900fc2a752713fbb8a5c99fa0dfa268 /Userland/Libraries/LibJS/Runtime/FunctionObject.h
parent332946ab4f77a16de6be7f9148817938c00e7ddd (diff)
downloadserenity-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/FunctionObject.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/FunctionObject.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/FunctionObject.h b/Userland/Libraries/LibJS/Runtime/FunctionObject.h
index 3cfa762166..dce1c3ea99 100644
--- a/Userland/Libraries/LibJS/Runtime/FunctionObject.h
+++ b/Userland/Libraries/LibJS/Runtime/FunctionObject.h
@@ -11,6 +11,7 @@
namespace JS {
+// 10.2 ECMAScript Function Objects, https://tc39.es/ecma262/#sec-ecmascript-function-objects
class FunctionObject : public Object {
JS_OBJECT(Function, Object);
@@ -48,7 +49,7 @@ public:
virtual Environment* environment() { return nullptr; }
// [[Realm]]
- virtual GlobalObject* realm() const { return nullptr; }
+ virtual Realm* realm() const { return nullptr; }
enum class ThisMode : u8 {
Lexical,