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

Issue 10810056: Improve String::WriteAscii and add PRESERVE_ASCII_NULL option. (Closed)

Created:
8 years, 5 months ago by Yang
Modified:
8 years, 5 months ago
Reviewers:
Toon Verwaest
CC:
v8-dev
Visibility:
Public.

Description

Improve String::WriteAscii and add PRESERVE_ASCII_NULL option. The PRESERVE_ASCII_NULL option prevents WriteAscii from converting \0 to white space. R=verwaest@chromium.org BUG=v8:2252 TEST=test-api/StringWrite Committed: https://code.google.com/p/v8/source/detail?r=12174

Patch Set 1 #

Total comments: 2

Patch Set 2 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+61 lines, -18 lines) Patch
M include/v8.h View 1 chunk +2 lines, -1 line 0 comments Download
M src/api.cc View 7 chunks +36 lines, -17 lines 0 comments Download
M test/cctest/test-api.cc View 1 2 chunks +23 lines, -0 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
Yang
8 years, 5 months ago (2012-07-23 12:40:23 UTC) #1
Toon Verwaest
8 years, 5 months ago (2012-07-23 13:07:21 UTC) #2
lgtm with nits.

https://chromiumcodereview.appspot.com/10810056/diff/1/test/cctest/test-api.cc
File test/cctest/test-api.cc (right):

https://chromiumcodereview.appspot.com/10810056/diff/1/test/cctest/test-api.c...
test/cctest/test-api.cc:5786: utf8buf[5] = 'X';  // Test that the sixth
character is left untouched.
This comment probably belongs on line 5790.

https://chromiumcodereview.appspot.com/10810056/diff/1/test/cctest/test-api.c...
test/cctest/test-api.cc:5794: CHECK_EQ(0, strcmp(utf8buf, "abcde"));
Testing with strcmp and strncmp seems superfluous.

Powered by Google App Engine
This is Rietveld 408576698