Conversation
ECMA-262 now has Iterator.prototype.take and Iterator.prototype.drop throw a RangeError, after closing the underlying iterator, when the limit is finite and greater than 2^53 - 1 (tc39/ecma262#3776). Add that step to both methods and renumber the step comments that follow it.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This Pull Request implements the
limitvalidation that tc39/ecma262#3776 added toIterator.prototype.takeandIterator.prototype.drop.It changes the following:
limitconverts to a finite Number greater than 2^53 - 1, the method closes the underlying iterator and throws aRangeError.Infinityis still accepted.NaNand negative limits are rejected as before.Number.MAX_SAFE_INTEGER, equal to it, andInfinity. They also check that a rejected limit closes the underlying iterator.Test262 results for the full suite, compared with
mainusingboa_tester compare: 6 tests fixed, no regressions.cargo fmt --all --checkis clean. So iscargo clippy -p boa_engine --all-features --all-targetswith-D warnings.