DescriptionFix order of conversions in String.prototype.substr.
The start argument must be converted to an integer before the length argument is
converted. (Consequently, the start argument is converted even when the length
is 0.) This matters because conversion is observable.
Also rewrite the function in a way that closely resembles the spec text.
R=littledan@chromium.org
BUG=v8:5140
Committed: https://crrev.com/f96be554b92a1e72eb524a43ad488d354ac0b603
Cr-Commit-Position: refs/heads/master@{#37378}
Patch Set 1 #Patch Set 2 : Get s.length only once. #
Messages
Total messages: 8 (3 generated)
|