LibJS: Implement Error function/constructor

This commit is contained in:
Linus Groh
2020-04-01 19:42:07 +01:00
committed by Andreas Kling
parent 849e2c77e4
commit ee6472fef2
5 changed files with 134 additions and 0 deletions

View File

@@ -4,6 +4,7 @@
#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/ConsoleObject.h>
#include <LibJS/Runtime/DateConstructor.h>
#include <LibJS/Runtime/ErrorConstructor.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/MathObject.h>
#include <LibJS/Runtime/NativeFunction.h>
@@ -19,6 +20,7 @@ GlobalObject::GlobalObject()
put("console", heap().allocate<ConsoleObject>());
put("Date", heap().allocate<DateConstructor>());
put("Error", heap().allocate<ErrorConstructor>());
put("Math", heap().allocate<MathObject>());
put("Object", heap().allocate<ObjectConstructor>());
}