diff options
author | Andreas Kling <kling@serenityos.org> | 2022-08-01 20:27:20 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-08-05 12:42:46 +0200 |
commit | 50d951aea24af43256e138d60fe0c48770570919 (patch) | |
tree | 24190fc4a4003a6d7d87d282afaea7de58cc6a02 /Userland/Libraries/LibJS/Runtime/Object.h | |
parent | 7a6935a2ff85178e1059ca07132a1fff9e55eab2 (diff) | |
download | serenity-50d951aea24af43256e138d60fe0c48770570919.zip |
LibJS: Let Shape store a Realm instead of a GlobalObject
This is a cautious first step towards being able to create JS objects
before a global object has been instantiated.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Object.h')
-rw-r--r-- | Userland/Libraries/LibJS/Runtime/Object.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Object.h b/Userland/Libraries/LibJS/Runtime/Object.h index e77fda9c17..d3ed79b51a 100644 --- a/Userland/Libraries/LibJS/Runtime/Object.h +++ b/Userland/Libraries/LibJS/Runtime/Object.h @@ -186,7 +186,7 @@ public: Shape& shape() { return *m_shape; } Shape const& shape() const { return *m_shape; } - GlobalObject& global_object() const { return *shape().global_object(); } + GlobalObject& global_object() const; void ensure_shape_is_unique(); @@ -196,7 +196,7 @@ public: protected: enum class GlobalObjectTag { Tag }; enum class ConstructWithoutPrototypeTag { Tag }; - explicit Object(GlobalObjectTag); + explicit Object(GlobalObjectTag, Realm&); Object(ConstructWithoutPrototypeTag, GlobalObject&); void set_prototype(Object*); |