summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2021-07-10 22:53:54 -0400
committerLinus Groh <mail@linusgroh.de>2021-07-14 20:44:42 +0100
commita61723ec599be984523e40030c05e3a3f3af7e67 (patch)
tree00d725d64b5712f2e8b48ff5170eba6b6ff562b3 /Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
parentdf75c35d5ba62b99a8e2544a734e22bc4f81a394 (diff)
downloadserenity-a61723ec599be984523e40030c05e3a3f3af7e67.zip
LibJS: Begin implementing Atomics
This adds the Atomics object to the global object and sets up only its @@toStringTag property.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/GlobalObject.cpp')
-rw-r--r--Userland/Libraries/LibJS/Runtime/GlobalObject.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
index f64ebb9b45..2b729d4deb 100644
--- a/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
+++ b/Userland/Libraries/LibJS/Runtime/GlobalObject.cpp
@@ -20,6 +20,7 @@
#include <LibJS/Runtime/ArrayConstructor.h>
#include <LibJS/Runtime/ArrayIteratorPrototype.h>
#include <LibJS/Runtime/ArrayPrototype.h>
+#include <LibJS/Runtime/AtomicsObject.h>
#include <LibJS/Runtime/BigIntConstructor.h>
#include <LibJS/Runtime/BigIntPrototype.h>
#include <LibJS/Runtime/BooleanConstructor.h>
@@ -184,6 +185,7 @@ void GlobalObject::initialize_global_object()
define_direct_property(vm.names.globalThis, this, attr);
define_direct_property(vm.names.console, heap().allocate<ConsoleObject>(*this, *this), attr);
+ define_direct_property(vm.names.Atomics, heap().allocate<AtomicsObject>(*this, *this), attr);
define_direct_property(vm.names.Math, heap().allocate<MathObject>(*this, *this), attr);
define_direct_property(vm.names.JSON, heap().allocate<JSONObject>(*this, *this), attr);
define_direct_property(vm.names.Reflect, heap().allocate<ReflectObject>(*this, *this), attr);