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

Issue 10411038: Fix some dart api functions to use the proper unwrap patterns. (Closed)

Created:
8 years, 7 months ago by siva
Modified:
8 years, 7 months ago
Reviewers:
cshapiro
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

Fix some dart api functions to use the proper unwrap patterns. Committed: https://code.google.com/p/dart/source/detail?r=7824

Patch Set 1 #

Total comments: 4

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+67 lines, -86 lines) Patch
M vm/dart_api_impl.cc View 1 7 chunks +58 lines, -77 lines 0 comments Download
M vm/dart_api_impl_test.cc View 1 chunk +9 lines, -9 lines 0 comments Download

Messages

Total messages: 3 (0 generated)
siva
8 years, 7 months ago (2012-05-19 01:18:10 UTC) #1
cshapiro
lgtm http://codereview.chromium.org/10411038/diff/1/vm/dart_api_impl.cc File vm/dart_api_impl.cc (right): http://codereview.chromium.org/10411038/diff/1/vm/dart_api_impl.cc#newcode1544 vm/dart_api_impl.cc:1544: intptr_t string_length = strlen(string_value); Maybe call Utf8::Length here ...
8 years, 7 months ago (2012-05-19 01:57:00 UTC) #2
siva
8 years, 7 months ago (2012-05-21 21:41:26 UTC) #3
http://codereview.chromium.org/10411038/diff/1/vm/dart_api_impl.cc
File vm/dart_api_impl.cc (right):

http://codereview.chromium.org/10411038/diff/1/vm/dart_api_impl.cc#newcode1544
vm/dart_api_impl.cc:1544: intptr_t string_length = strlen(string_value);
On 2012/05/19 01:57:00, cshapiro wrote:
> Maybe call Utf8::Length here instead?

Done.

http://codereview.chromium.org/10411038/diff/1/vm/dart_api_impl.cc#newcode1550
vm/dart_api_impl.cc:1550: strncpy(res, string_value, string_length + 1);
On 2012/05/19 01:57:00, cshapiro wrote:
> Maybe use memmove instead of strncpy?

Done.

Powered by Google App Engine
This is Rietveld 408576698