mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 07:17:35 +00:00
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.
This commit is contained in:
parent
7a6935a2ff
commit
50d951aea2
22 changed files with 104 additions and 55 deletions
|
@ -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*);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue