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

Issue 11275107: Fix length computation in Dart_StringToUTF8. (Closed)

Created:
8 years, 1 month ago by siva
Modified:
8 years, 1 month ago
Reviewers:
Bill Hesse, cshapiro
CC:
reviews_dartlang.org, vm-dev_dartlang.org, Anton Muhin
Visibility:
Public.

Description

Fix length computation in Dart_StringToUTF8. Committed: https://code.google.com/p/dart/source/detail?r=14588

Patch Set 1 #

Total comments: 10

Patch Set 2 : #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+26 lines, -16 lines) Patch
M bin/builtin_natives.cc View 1 1 chunk +4 lines, -5 lines 2 comments Download
M include/dart_api.h View 1 1 chunk +6 lines, -5 lines 0 comments Download
M vm/dart_api_impl.cc View 1 2 chunks +16 lines, -6 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
siva
8 years, 1 month ago (2012-11-01 20:23:37 UTC) #1
Bill Hesse
http://codereview.chromium.org/11275107/diff/1/bin/builtin_natives.cc File bin/builtin_natives.cc (right): http://codereview.chromium.org/11275107/diff/1/bin/builtin_natives.cc#newcode112 bin/builtin_natives.cc:112: length = (length * sizeof(uint16_t)); This is not enough. ...
8 years, 1 month ago (2012-11-01 20:38:01 UTC) #2
cshapiro
http://codereview.chromium.org/11275107/diff/1/vm/dart_api_impl.cc File vm/dart_api_impl.cc (right): http://codereview.chromium.org/11275107/diff/1/vm/dart_api_impl.cc#newcode1677 vm/dart_api_impl.cc:1677: *length= str_len; missing horizontal space.
8 years, 1 month ago (2012-11-01 20:59:30 UTC) #3
siva
http://codereview.chromium.org/11275107/diff/1/bin/builtin_natives.cc File bin/builtin_natives.cc (right): http://codereview.chromium.org/11275107/diff/1/bin/builtin_natives.cc#newcode116 bin/builtin_natives.cc:116: result = Dart_StringToUTF8(str, chars, &length); Because that would mean ...
8 years, 1 month ago (2012-11-01 21:23:03 UTC) #4
Bill Hesse
LGTM. http://codereview.chromium.org/11275107/diff/7001/bin/builtin_natives.cc File bin/builtin_natives.cc (right): http://codereview.chromium.org/11275107/diff/7001/bin/builtin_natives.cc#newcode113 bin/builtin_natives.cc:113: // interrupt. I agree that errors should be ...
8 years, 1 month ago (2012-11-02 09:16:00 UTC) #5
cshapiro
http://codereview.chromium.org/11275107/diff/1/bin/builtin_natives.cc File bin/builtin_natives.cc (right): http://codereview.chromium.org/11275107/diff/1/bin/builtin_natives.cc#newcode112 bin/builtin_natives.cc:112: length = (length * sizeof(uint16_t)); We should be emitting ...
8 years, 1 month ago (2012-11-02 17:01:56 UTC) #6
siva
8 years, 1 month ago (2012-11-06 01:35:22 UTC) #7
Anton,

We have had to change the API of
Dart_StringToUTF8 because of some usability problems with
the older version. This CL has the change and I wanted
to co-ordinate submission of this change with you so
that dartium build does not break.

Siva.

http://codereview.chromium.org/11275107/diff/7001/bin/builtin_natives.cc
File bin/builtin_natives.cc (right):

http://codereview.chromium.org/11275107/diff/7001/bin/builtin_natives.cc#newc...
bin/builtin_natives.cc:113: // interrupt.
Agree but probably should be done in a different CL as it requires signature
changes etc.

On 2012/11/02 09:16:00, Bill Hesse wrote:
> I agree that errors should be propagated.  I believe that just replacing the
> print with PropagateError(result) would give better behavior.

Powered by Google App Engine
This is Rietveld 408576698