Skip to content

Commit

Permalink
Normative: throw when trying to write to a detached buffer
Browse files Browse the repository at this point in the history
  • Loading branch information
bakkot committed Jan 24, 2024
1 parent db3947c commit 1a787a5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions spec.html
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ <h1>Uint8Array.fromBase64Into ( _string_, _into_ [ , _options_ ] )</h1>
1. If _lastChunkHandling_ is *undefined*, set _lastChunkHandling_ to *"loose"*.
1. If _lastChunkHandling_ is not one of *"loose"*, *"strict"*, or *"stop-before-partial"*, throw a *TypeError* exception.
1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_into_, ~seq-cst~).
1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception.
1. Let _byteLength_ be TypedArrayByteLength(_taRecord_).
1. Let _maxLength_ be _byteLength_.
1. Let _result_ be ? FromBase64(_string_, _alphabet_, _lastChunkHandling_, _maxLength_).
Expand Down Expand Up @@ -121,6 +122,7 @@ <h1>Uint8Array.fromHexInto ( _string_, _into_ )</h1>
1. If _string_ is not a String, throw a *TypeError* exception.
1. Perform ? ValidateUint8Array(_into_).
1. Let _taRecord_ be MakeTypedArrayWithBufferWitnessRecord(_into_, ~seq-cst~).
1. If IsTypedArrayOutOfBounds(_taRecord_) is *true*, throw a *TypeError* exception.
1. Let _byteLength_ be TypedArrayByteLength(_taRecord_).
1. Let _maxLength_ be _byteLength_.
1. Let _result_ be ? FromHex(_string_, _maxLength_).
Expand Down

0 comments on commit 1a787a5

Please sign in to comment.