1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 15:17:36 +00:00

LibJS: Interpreter::this_value() => this_value(GlobalObject&)

Once the Interpreter has no global object attached to it, we have to
provide it everywhere.
This commit is contained in:
Andreas Kling 2020-06-08 21:10:22 +02:00
parent 25f2a29d84
commit 053863f35e
25 changed files with 78 additions and 73 deletions

View file

@ -28,6 +28,7 @@
#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/Array.h>
#include <LibJS/Runtime/Error.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/PrimitiveString.h>
#include <LibJS/Runtime/Value.h>
#include <LibWeb/Bindings/DocumentWrapper.h>
@ -61,7 +62,7 @@ const Document& DocumentWrapper::node() const
static Document* document_from(JS::Interpreter& interpreter)
{
auto* this_object = interpreter.this_value().to_object(interpreter);
auto* this_object = interpreter.this_value(interpreter.global_object()).to_object(interpreter);
if (!this_object)
return {};
if (StringView("DocumentWrapper") != this_object->class_name()) {