This repository has been archived by the owner on Oct 24, 2023. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Previously, the variable named "byteLengthChecked" could contain a
specification label ("
empty") or a Number value. Despite this, it wasonly used to determine whether a single condition had been satisfied.
Using a complex type to describe a binary state made the algorithm
appear more complicated than it truly is.
In addition, that variable was defined solely to determine whether the
view's byte length needed to be validated. However, the conditions
determining the necessity of this validation can be inferred from other
specification variables.
Remove the "byteLengthChecked" variable and reference the value of
"viewByteLength" to determine when to perform validation. Although this
approach will encourage unnecessary validation (specifically: whenever a
byte length has not been specified for a non-resizable buffer), that
behavior is not observable and therefore implementations are free to
skip it.
Alternatively, see gh-83