mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 14:35:07 +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
|
@ -35,8 +35,7 @@ namespace JS {
|
|||
|
||||
NumberObject* NumberObject::create(GlobalObject& global_object, double value)
|
||||
{
|
||||
auto& interpreter = global_object.interpreter();
|
||||
return interpreter.heap().allocate<NumberObject>(value, *interpreter.number_prototype());
|
||||
return global_object.heap().allocate<NumberObject>(value, *global_object.number_prototype());
|
||||
}
|
||||
|
||||
NumberObject::NumberObject(double value, Object& prototype)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue