mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 05:47:34 +00:00
LibJS: Reduce header dependency graph in Realm.h
This commit is contained in:
parent
6ddbe8f953
commit
aeb72fe9d0
9 changed files with 20 additions and 8 deletions
|
@ -1,15 +1,15 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Linus Groh <linusg@serenityos.org>
|
||||
* Copyright (c) 2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/OwnPtr.h>
|
||||
#include <AK/Weakable.h>
|
||||
#include <LibJS/Heap/Cell.h>
|
||||
#include <LibJS/Runtime/GlobalEnvironment.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
|
@ -24,11 +24,7 @@ public:
|
|||
|
||||
Realm() = default;
|
||||
|
||||
// 9.3.1 CreateRealm ( ), https://tc39.es/ecma262/#sec-createrealm
|
||||
static Realm* create(VM& vm)
|
||||
{
|
||||
return vm.heap().allocate_without_global_object<Realm>();
|
||||
}
|
||||
static Realm* create(VM&);
|
||||
|
||||
void set_global_object(GlobalObject&, Object* this_value = nullptr);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue