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

Issue 1528005: Fix bug in string replace regexp with function when returning non-string. (Closed)

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

Description

Fix bug in string replace regexp with function when returning non-string.

Patch Set 1 #

Total comments: 6
Unified diffs Side-by-side diffs Delta from patch set Stats (+11 lines, -3 lines) Patch
M src/string.js View 2 chunks +3 lines, -3 lines 6 comments Download
M test/mjsunit/string-replace.js View 1 chunk +8 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Lasse Reichstein
Small review.
10 years, 9 months ago (2010-03-29 16:07:32 UTC) #1
fschneider
LGTM. http://codereview.chromium.org/1528005/diff/1/2 File src/string.js (right): http://codereview.chromium.org/1528005/diff/1/2#newcode453 src/string.js:453: if (!IS_STRING(func_result)) func_result = NonStringToString(func_result); Long line. http://codereview.chromium.org/1528005/diff/1/2#newcode467 ...
10 years, 9 months ago (2010-03-29 16:21:47 UTC) #2
Vitaly Repeshko
Drive by comment. Thanks, Vitaly http://codereview.chromium.org/1528005/diff/1/2 File src/string.js (right): http://codereview.chromium.org/1528005/diff/1/2#newcode453 src/string.js:453: if (!IS_STRING(func_result)) func_result = ...
10 years, 9 months ago (2010-03-29 16:52:53 UTC) #3
Lasse Reichstein
10 years, 9 months ago (2010-03-29 18:58:31 UTC) #4
http://codereview.chromium.org/1528005/diff/1/2
File src/string.js (right):

http://codereview.chromium.org/1528005/diff/1/2#newcode453
src/string.js:453: if (!IS_STRING(func_result)) func_result =
NonStringToString(func_result);
Line wrapped.
Re. TO_STRING_INLINE, I considered it, but it seems wasteful to do the identity
assignment if the result is a string.

http://codereview.chromium.org/1528005/diff/1/2#newcode467
src/string.js:467: if (!IS_STRING(func_result)) func_result =
NonStringToString(func_result);
Dittos.

Powered by Google App Engine
This is Rietveld 408576698