1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 19:05:08 +00:00

LibJS: Make Value::to_object() take a GlobalObject&

This commit is contained in:
Andreas Kling 2020-06-20 16:40:30 +02:00
parent cd14ebb11f
commit 8d56e6103e
28 changed files with 129 additions and 129 deletions

View file

@ -53,9 +53,9 @@ ImageDataWrapper::~ImageDataWrapper()
{
}
static ImageData* impl_from(JS::Interpreter& interpreter)
static ImageData* impl_from(JS::Interpreter& interpreter, JS::GlobalObject& global_object)
{
auto* this_object = interpreter.this_value(interpreter.global_object()).to_object(interpreter);
auto* this_object = interpreter.this_value(global_object).to_object(interpreter, global_object);
if (!this_object) {
ASSERT_NOT_REACHED();
return nullptr;
@ -69,7 +69,7 @@ static ImageData* impl_from(JS::Interpreter& interpreter)
JS_DEFINE_NATIVE_GETTER(ImageDataWrapper::width_getter)
{
auto* impl = impl_from(interpreter);
auto* impl = impl_from(interpreter, global_object);
if (!impl)
return {};
return JS::Value(impl->width());
@ -77,7 +77,7 @@ JS_DEFINE_NATIVE_GETTER(ImageDataWrapper::width_getter)
JS_DEFINE_NATIVE_GETTER(ImageDataWrapper::height_getter)
{
auto* impl = impl_from(interpreter);
auto* impl = impl_from(interpreter, global_object);
if (!impl)
return {};
return JS::Value(impl->height());
@ -85,7 +85,7 @@ JS_DEFINE_NATIVE_GETTER(ImageDataWrapper::height_getter)
JS_DEFINE_NATIVE_GETTER(ImageDataWrapper::data_getter)
{
auto* impl = impl_from(interpreter);
auto* impl = impl_from(interpreter, global_object);
if (!impl)
return {};
return impl->data();