From 99bf986889e03c9537ddb6dc567754d2b8f8e9a4 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Wed, 27 Dec 2023 21:13:46 +1300 Subject: [PATCH] LibWeb: Use `unsigned long long` for ReadableStreamBYOBRequest.respond Now that the IDL generator supports this :^) --- .../Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.cpp | 2 +- Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h | 3 ++- .../Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.idl | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.cpp b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.cpp index d2fe96fe05..dcea6abadd 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.cpp +++ b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.cpp @@ -39,7 +39,7 @@ void ReadableStreamBYOBRequest::visit_edges(Cell::Visitor& visitor) visitor.visit(m_view); } -WebIDL::ExceptionOr ReadableStreamBYOBRequest::respond(u64 bytes_written) +WebIDL::ExceptionOr ReadableStreamBYOBRequest::respond(WebIDL::UnsignedLongLong bytes_written) { // 1. If this.[[controller]] is undefined, throw a TypeError exception. if (!m_controller) diff --git a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h index 6f651e9169..f5a6007b5f 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h +++ b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.h @@ -11,6 +11,7 @@ #include #include #include +#include namespace Web::Streams { @@ -28,7 +29,7 @@ public: void set_view(JS::GCPtr value) { m_view = value; } - WebIDL::ExceptionOr respond(u64 bytes_written); + WebIDL::ExceptionOr respond(WebIDL::UnsignedLongLong bytes_written); private: explicit ReadableStreamBYOBRequest(JS::Realm&); diff --git a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.idl b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.idl index a84671a484..36ce9d8d62 100644 --- a/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.idl +++ b/Userland/Libraries/LibWeb/Streams/ReadableStreamBYOBRequest.idl @@ -3,7 +3,6 @@ interface ReadableStreamBYOBRequest { readonly attribute ArrayBufferView? view; - // FIXME: Should be unsigned long long - undefined respond([EnforceRange] unsigned long bytesWritten); + undefined respond([EnforceRange] unsigned long long bytesWritten); // FIXME: undefined respondWithNewView(ArrayBufferView view); };