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

Issue 1756013: Added regression test for crbug 40931 http://crbug.com/40931 (Closed)

Created:
10 years, 8 months ago by Rico
Modified:
9 years, 6 months ago
Reviewers:
Lasse Reichstein
CC:
v8-dev, sandholm
Visibility:
Public.

Description

Added regression test for crbug 40931 http://crbug.com/40931 Committed: http://code.google.com/p/v8/source/detail?r=4497

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -0 lines) Patch
A test/mjsunit/regress/regress-crbug-40931.js View 1 1 chunk +45 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Rico
Small regression test for string.split bug where index and input indices where added.
10 years, 8 months ago (2010-04-26 11:24:19 UTC) #1
Lasse Reichstein
LGTM http://codereview.chromium.org/1756013/diff/1/2 File test/mjsunit/regress/regress-crbug-40931.js (right): http://codereview.chromium.org/1756013/diff/1/2#newcode34 test/mjsunit/regress/regress-crbug-40931.js:34: var names = "a,b,c,d".split(/,/); Try doing the split ...
10 years, 8 months ago (2010-04-26 11:28:34 UTC) #2
Rico
10 years, 8 months ago (2010-04-26 11:57:39 UTC) #3
Thanks for the comments - I corrected them and encapsulated the test in a loop
running 10 times to make sure we hit the cache (I don't think we will hit it
until the third time)

http://codereview.chromium.org/1756013/diff/1/2
File test/mjsunit/regress/regress-crbug-40931.js (right):

http://codereview.chromium.org/1756013/diff/1/2#newcode34
test/mjsunit/regress/regress-crbug-40931.js:34: var names =
"a,b,c,d".split(/,/);
On 2010/04/26 11:28:34, Lasse Reichstein wrote:
> Try doing the split twice with the same arguments.
> The bug was introduced by caching, so it's a better test the result after
> caching has happened.
Actually i discovered (when looking into this) that the cache is not hit until
the third time - I added a for loop testing this ten times.

http://codereview.chromium.org/1756013/diff/1/2#newcode37
test/mjsunit/regress/regress-crbug-40931.js:37: for(i in names) {
On 2010/04/26 11:28:34, Lasse Reichstein wrote:
> You are assuming iteration order, which isn't guaranteed by specification.
> Instead collect the keys in an array, then sort and join them before
comparing.
Done

Powered by Google App Engine
This is Rietveld 408576698