summaryrefslogtreecommitdiff
path: root/Libraries/LibJS/Runtime/DateConstructor.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-18 13:18:06 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-18 13:24:45 +0200
commitfca08bd000e613459baf62fa8d37552ef11f3fe6 (patch)
treef20e36879896fb150a6031b4383b53296de6ca45 /Libraries/LibJS/Runtime/DateConstructor.cpp
parentcbcf317e760c3370d10cfc525f0f528abd44e820 (diff)
downloadserenity-fca08bd000e613459baf62fa8d37552ef11f3fe6.zip
LibJS: Move builtin prototypes to the global object
This moves us towards being able to run JavaScript in different global objects without allocating a separate GC heap.
Diffstat (limited to 'Libraries/LibJS/Runtime/DateConstructor.cpp')
-rw-r--r--Libraries/LibJS/Runtime/DateConstructor.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/Libraries/LibJS/Runtime/DateConstructor.cpp b/Libraries/LibJS/Runtime/DateConstructor.cpp
index 79bf837e78..d2f09ff9f3 100644
--- a/Libraries/LibJS/Runtime/DateConstructor.cpp
+++ b/Libraries/LibJS/Runtime/DateConstructor.cpp
@@ -28,15 +28,16 @@
#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/Date.h>
#include <LibJS/Runtime/DateConstructor.h>
+#include <LibJS/Runtime/GlobalObject.h>
#include <sys/time.h>
#include <time.h>
namespace JS {
DateConstructor::DateConstructor()
- : NativeFunction("Date", *interpreter().function_prototype())
+ : NativeFunction("Date", *interpreter().global_object().function_prototype())
{
- put("prototype", interpreter().date_prototype());
+ put("prototype", interpreter().global_object().date_prototype());
put("length", Value(7));
put_native_function("now", now);