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
commit affc479e83
Notes: sideshowbarker 2024-07-19 05:45:09 +09:00
12 changed files with 21 additions and 20 deletions

View file

@ -55,7 +55,7 @@ Value ErrorConstructor::construct(Interpreter& interpreter)
if (interpreter.exception())
return {};
}
return Error::create(interpreter.global_object(), "Error", message);
return Error::create(global_object(), "Error", message);
}
#define __JS_ENUMERATE(ClassName, snake_name, PrototypeName, ConstructorName) \