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

Issue 6928017: Trying to re-land http://codereview.chromium.org/6901141. (Closed)

Created:
9 years, 7 months ago by Nebojša Ćirić
Modified:
9 years, 7 months ago
CC:
v8-dev
Visibility:
Public.

Description

Trying to re-land http://codereview.chromium.org/6901141. Changes from previus revision: - Made my own strncpy in I18NUtils class (we can't use OS::SNPrintF nor snprintf). - Fixed a crashing bug related to ICU call in LanguageMatcher::BCP47ToICUFormat. TEST=Visit i18n.kaziprst.org/locale.html Committed: http://code.google.com/p/v8/source/detail?r=7796

Patch Set 1 : '' #

Total comments: 10

Patch Set 2 : Fixed Jungshik's comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+628 lines, -189 lines) Patch
M src/extensions/experimental/experimental.gyp View 1 1 chunk +4 lines, -0 lines 0 comments Download
M src/extensions/experimental/i18n.js View 1 2 chunks +119 lines, -55 lines 0 comments Download
M src/extensions/experimental/i18n-extension.cc View 1 chunk +0 lines, -14 lines 0 comments Download
M src/extensions/experimental/i18n-locale.h View 1 chunk +14 lines, -7 lines 0 comments Download
M src/extensions/experimental/i18n-locale.cc View 1 chunk +53 lines, -113 lines 0 comments Download
A src/extensions/experimental/i18n-utils.h View 1 1 chunk +49 lines, -0 lines 0 comments Download
A src/extensions/experimental/i18n-utils.cc View 1 chunk +43 lines, -0 lines 0 comments Download
A src/extensions/experimental/language-matcher.h View 1 chunk +95 lines, -0 lines 0 comments Download
A src/extensions/experimental/language-matcher.cc View 1 1 chunk +251 lines, -0 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
Nebojša Ćirić
Soren Gjesse: Previous commit was reverted because it was breaking Windows bots. I removed all ...
9 years, 7 months ago (2011-05-04 21:05:50 UTC) #1
jungshik at Google
LGTM http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/i18n-utils.cc File src/extensions/experimental/i18n-utils.cc (right): http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/i18n-utils.cc#newcode40 src/extensions/experimental/i18n-utils.cc:40: dest[length - 1] = '\0'; Effectively, you copy ...
9 years, 7 months ago (2011-05-04 22:45:47 UTC) #2
Nebojša Ćirić
9 years, 7 months ago (2011-05-04 23:09:40 UTC) #3
http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/...
File src/extensions/experimental/i18n-utils.cc (right):

http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/...
src/extensions/experimental/i18n-utils.cc:40: dest[length - 1] = '\0';
On 2011/05/04 22:45:47, Jungshik Shin wrote:
> Effectively, you copy at most |length -1| bytes, don't you? Pls, update the
> comment in the header accordingly.

Done.

http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/...
File src/extensions/experimental/i18n.js (right):

http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/...
src/extensions/experimental/i18n.js:52: this.icuLocaleID_ =
properties.icuLocaleID;
On 2011/05/04 22:45:47, Jungshik Shin wrote:
> Is adding '_' at the end "prominent enough" to tell that it's internal? I'm
just
> wondering if '__icuLocaleID__' would be a better (widely used) convention? 

Done.

http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/...
File src/extensions/experimental/language-matcher.cc (right):

http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/...
src/extensions/experimental/language-matcher.cc:136: if (*is_ascii == NULL)
return false;
On 2011/05/04 22:45:47, Jungshik Shin wrote:
> nit: ascii_value? 

Done.

http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/...
src/extensions/experimental/language-matcher.cc:201: // We need to check if
extension part of language id conforms to the length.
On 2011/05/04 22:45:47, Jungshik Shin wrote:
> Can you add a URL  to the bug you just filed? Thanks. 

Done.

http://codereview.chromium.org/6928017/diff/2003/src/extensions/experimental/...
src/extensions/experimental/language-matcher.cc:205: // Truncate to get
non-crashing string, but still preserve base language.
I've calculated the length of the base language and cutting there, removing
extension completely.

On 2011/05/04 22:45:47, Jungshik Shin wrote:
> How about truncating at the last logical boundary before going over the limit?
> Well, perhaps, it's not worth the trouble. If you don't want to do that, you
may
> want to note that here.

Powered by Google App Engine
This is Rietveld 408576698