diff options
author | Linus Groh <mail@linusgroh.de> | 2021-10-09 12:32:26 +0100 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2021-10-09 12:36:28 +0100 |
commit | 5b61b60bbd72c18d2b4c32f04bec0181b9c71471 (patch) | |
tree | c463131217ff16d120aa69c877e95537ce6a521c /Userland/Libraries/LibWeb | |
parent | 1fba5ca8c370ac1c42627761ddfeb8d3557e656b (diff) | |
download | serenity-5b61b60bbd72c18d2b4c32f04bec0181b9c71471.zip |
LibJS: Use AllocateArrayBuffer where the spec tells us to
Diffstat (limited to 'Userland/Libraries/LibWeb')
-rw-r--r-- | Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp index 1033bb8268..461e5b4ff9 100644 --- a/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp +++ b/Userland/Libraries/LibWeb/WebAssembly/WebAssemblyMemoryPrototype.cpp @@ -55,7 +55,7 @@ JS_DEFINE_NATIVE_FUNCTION(WebAssemblyMemoryPrototype::buffer_getter) if (!memory) return JS::js_undefined(); - auto array_buffer = JS::ArrayBuffer::create(global_object, &memory->data()); + auto array_buffer = TRY_OR_DISCARD(JS::ArrayBuffer::create(global_object, &memory->data())); array_buffer->set_detach_key(JS::js_string(vm, "WebAssembly.Memory")); return array_buffer; } |