From b5da87681792856a3d2e4c66834359eb0e372ae1 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Mon, 5 Jul 2021 12:33:29 +0100 Subject: [PATCH] LibWeb: Make WebAssembly.Memory.prototype.buffer an accessor property --- .../LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp index 28cb46d635..d98b384636 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp @@ -13,7 +13,7 @@ namespace Web::Bindings { void WebAssemblyMemoryPrototype::initialize(JS::GlobalObject& global_object) { Object::initialize(global_object); - define_native_property("buffer", buffer_getter, nullptr); + define_native_accessor("buffer", buffer_getter, {}); define_native_function("grow", grow); } @@ -42,7 +42,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::grow) return JS::Value(static_cast(previous_size)); } -JS_DEFINE_NATIVE_GETTER(WebAssemblyMemoryPrototype::buffer_getter) +JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::buffer_getter) { auto* this_object = vm.this_value(global_object).to_object(global_object); if (!this_object || !is(this_object)) {