LibWeb: Align specification step text with current specification

This commit is contained in:
Kenneth Myhra 2025-07-14 22:25:22 +02:00 committed by Shannon Booth
commit 2394845d58
Notes: github-actions[bot] 2025-07-20 00:32:25 +00:00

View file

@ -83,7 +83,7 @@ void ReadableByteStreamController::initialize(JS::Realm& realm)
WebIDL::ExceptionOr<void> ReadableByteStreamController::enqueue(GC::Root<WebIDL::ArrayBufferView>& chunk)
{
// 1. If chunk.[[ByteLength]] is 0, throw a TypeError exception.
// 2. If chunk.[[ViewedArrayBuffer]].[[ArrayBufferByteLength]] is 0, throw a TypeError exception.
// 2. If chunk.[[ViewedArrayBuffer]].[[ByteLength]] is 0, throw a TypeError exception.
if (chunk->byte_length() == 0 || chunk->viewed_array_buffer()->byte_length() == 0)
return WebIDL::SimpleException { WebIDL::SimpleExceptionType::TypeError, "Cannot enqueue chunk with byte length of zero"sv };