Skip to content

Commit

Permalink
Add a warning to always check the assertion
Browse files Browse the repository at this point in the history
  • Loading branch information
MattiasBuelens committed Sep 16, 2024
1 parent 09c3a55 commit 8455b9c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -3444,6 +3444,11 @@ The following abstract operations support the implementation of the
1. Assert: ! [$CanCopyDataBlockBytes$](|pullIntoDescriptor|'s [=pull-into descriptor/buffer=],
|destStart|, |headOfQueue|'s [=readable byte stream queue entry/buffer=],
|headOfQueue|'s [=readable byte stream queue entry/byte offset=], |bytesToCopy|) is true.
<p class="warning">If this assertion were to fail (due to a bug in this specification or
its implementation), then the next step may read from or write to potentially invalid memory.
The user agent should always check this assertion, and stop in an [=implementation-defined=]
manner if it fails (e.g. by crashing the process, or by
<a abstract-op lt="ReadableByteStreamControllerError">erroring the stream</a>).
1. Perform ! [$CopyDataBlockBytes$](|pullIntoDescriptor|'s [=pull-into
descriptor/buffer=].\[[ArrayBufferData]], |destStart|,
|headOfQueue|'s [=readable byte stream queue entry/buffer=].\[[ArrayBufferData]],
Expand Down

0 comments on commit 8455b9c

Please sign in to comment.