1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:18:11 +00:00

LibJS+LibWeb: Remove a bunch of calls to Interpreter::global_object()

Objects should get the GlobalObject from themselves instead. However,
it's not yet available during construction so this only switches code
that happens after construction.

To support multiple global objects, Interpreter needs to stop holding
on to "the" global object and let each object graph own their global.
This commit is contained in:
Andreas Kling 2020-06-08 12:25:45 +02:00
parent ff8bb962b6
commit affc479e83
12 changed files with 21 additions and 20 deletions

View file

@ -61,7 +61,7 @@ ObjectConstructor::~ObjectConstructor()
Value ObjectConstructor::call(Interpreter& interpreter)
{
return Object::create_empty(interpreter, interpreter.global_object());
return Object::create_empty(interpreter, global_object());
}
Value ObjectConstructor::construct(Interpreter& interpreter)