mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 10:28:10 +00:00
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.
This commit is contained in:
parent
cbcf317e76
commit
fca08bd000
40 changed files with 131 additions and 101 deletions
|
@ -29,13 +29,14 @@
|
|||
#include <LibJS/Runtime/BooleanConstructor.h>
|
||||
#include <LibJS/Runtime/BooleanObject.h>
|
||||
#include <LibJS/Runtime/BooleanPrototype.h>
|
||||
#include <LibJS/Runtime/GlobalObject.h>
|
||||
|
||||
namespace JS {
|
||||
|
||||
BooleanConstructor::BooleanConstructor()
|
||||
: NativeFunction("Boolean", *interpreter().function_prototype())
|
||||
: NativeFunction("Boolean", *interpreter().global_object().function_prototype())
|
||||
{
|
||||
put("prototype", Value(interpreter().boolean_prototype()));
|
||||
put("prototype", Value(interpreter().global_object().boolean_prototype()));
|
||||
put("length", Value(1));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue