Chromium Code Reviews| Index: vm/dart_api_impl.cc |
| =================================================================== |
| --- vm/dart_api_impl.cc (revision 14418) |
| +++ vm/dart_api_impl.cc (working copy) |
| @@ -1669,7 +1669,7 @@ |
| if (str_obj.IsNull()) { |
| RETURN_TYPE_ERROR(isolate, str, String); |
| } |
| - intptr_t str_len = str_obj.Length(); |
| + intptr_t str_len = Utf8::Length(str_obj); |
|
Bill Hesse
2012/11/01 20:38:01
There is still no way for the user to know the len
siva
2012/11/01 21:23:03
I have changed the API to do a scope allocation in
|
| if (str_len > *length) { |
|
Bill Hesse
2012/11/01 20:38:01
I think this is not enough. There is no way for t
siva
2012/11/01 21:23:03
Check removed.
On 2012/11/01 20:38:01, Bill Hesse
|
| return Api::NewError("Input array is not large enough to hold the result"); |
| } |