LibWeb: Use move on ByteBuffer in TransferArrayBuffer

This commit is contained in:
Shannon Booth 2023-11-19 11:50:45 +13:00 committed by Andreas Kling
parent 446a78f30e
commit 25f8b80eab
Notes: sideshowbarker 2024-07-17 05:23:40 +09:00

View file

@ -1664,7 +1664,7 @@ WebIDL::ExceptionOr<JS::NonnullGCPtr<JS::ArrayBuffer>> transfer_array_buffer(JS:
TRY(JS::detach_array_buffer(vm, buffer));
// 5. Return a new ArrayBuffer object, created in the current Realm, whose [[ArrayBufferData]] internal slot value is arrayBufferData and whose [[ArrayBufferByteLength]] internal slot value is arrayBufferByteLength.
return JS::ArrayBuffer::create(realm, array_buffer);
return JS::ArrayBuffer::create(realm, move(array_buffer));
}
// https://streams.spec.whatwg.org/#abstract-opdef-readablebytestreamcontrollerenqueuedetachedpullintotoqueue