mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 05:57:44 +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
|
@ -92,7 +92,10 @@ class ReplObject final : public JS::GlobalObject {
|
|||
JS_OBJECT(ReplObject, JS::GlobalObject);
|
||||
|
||||
public:
|
||||
ReplObject() = default;
|
||||
ReplObject(JS::Realm& realm)
|
||||
: GlobalObject(realm)
|
||||
{
|
||||
}
|
||||
virtual void initialize_global_object() override;
|
||||
virtual ~ReplObject() override = default;
|
||||
|
||||
|
@ -110,7 +113,10 @@ class ScriptObject final : public JS::GlobalObject {
|
|||
JS_OBJECT(ScriptObject, JS::GlobalObject);
|
||||
|
||||
public:
|
||||
ScriptObject() = default;
|
||||
ScriptObject(JS::Realm& realm)
|
||||
: JS::GlobalObject(realm)
|
||||
{
|
||||
}
|
||||
virtual void initialize_global_object() override;
|
||||
virtual ~ScriptObject() override = default;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue