mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:48:10 +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:
parent
ff8bb962b6
commit
affc479e83
12 changed files with 21 additions and 20 deletions
|
@ -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) \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue