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
commit 053863f35e
Notes: sideshowbarker 2024-07-19 05:44:47 +09:00
25 changed files with 78 additions and 73 deletions

View file

@ -27,6 +27,7 @@
#include <AK/FlyString.h>
#include <AK/Function.h>
#include <LibJS/Interpreter.h>
#include <LibJS/Runtime/GlobalObject.h>
#include <LibJS/Runtime/PrimitiveString.h>
#include <LibJS/Runtime/Value.h>
#include <LibWeb/Bindings/CanvasRenderingContext2DWrapper.h>
@ -62,7 +63,7 @@ const HTMLCanvasElement& HTMLCanvasElementWrapper::node() const
static HTMLCanvasElement* impl_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 nullptr;
// FIXME: Verify that it's a HTMLCanvasElementWrapper somehow!