mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 23:17:46 +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
|
@ -4,10 +4,19 @@
|
|||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <LibJS/Runtime/GlobalEnvironment.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
#include <LibJS/Runtime/Realm.h>
|
||||
#include <LibJS/Runtime/VM.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
// 9.3.1 CreateRealm ( ), https://tc39.es/ecma262/#sec-createrealm
|
||||
Realm* Realm::create(VM& vm)
|
||||
{
|
||||
return vm.heap().allocate_without_global_object<Realm>();
|
||||
}
|
||||
|
||||
// 9.3.3 SetRealmGlobalObject ( realmRec, globalObj, thisValue ), https://tc39.es/ecma262/#sec-setrealmglobalobject
|
||||
void Realm::set_global_object(GlobalObject& global_object, Object* this_value)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue