mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 09:07:45 +00:00
LibWeb: Make WebAssembly.Memory.prototype.buffer an accessor property
This commit is contained in:
parent
b73b6fbd4c
commit
b5da876817
1 changed files with 2 additions and 2 deletions
|
@ -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<u32>(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<WebAssemblyMemoryObject>(this_object)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue