Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Issue 2109583002: Fix order of conversions in String.prototype.substr. (Closed)

Created:
4 years, 5 months ago by neis
Modified:
4 years, 5 months ago
Reviewers:
Dan Ehrenberg
CC:
v8-reviews_googlegroups.com
Base URL:
https://chromium.googlesource.com/v8/v8.git@master
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

Fix 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. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+28 lines, -36 lines) Patch
M src/js/string.js View 1 1 chunk +9 lines, -33 lines 0 comments Download
M test/mjsunit/substr.js View 1 chunk +19 lines, -0 lines 0 comments Download
M test/test262/test262.status View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 8 (3 generated)
neis
4 years, 5 months ago (2016-06-28 09:30:25 UTC) #1
Dan Ehrenberg
lgtm Much cleaner!
4 years, 5 months ago (2016-06-28 18:15:36 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2109583002/20001
4 years, 5 months ago (2016-06-29 08:41:56 UTC) #5
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 5 months ago (2016-06-29 09:51:44 UTC) #6
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 09:54:02 UTC) #8
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/f96be554b92a1e72eb524a43ad488d354ac0b603
Cr-Commit-Position: refs/heads/master@{#37378}

Powered by Google App Engine
This is Rietveld 408576698