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

Issue 11580003: Changes per discussion with Anton (Closed)

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

Description

Changes per discussion with Anton - Add a new API call Dart_StringTolatin1 so that the contents of a string object that satisfies Dart_IsStringLatin1 can be gotten - Tweak Dart_MakeExternalString to copy out the contents of the string for valid string objects that can not be externalized by the VM (e.g strings in the VM isolate) Committed: https://code.google.com/p/dart/source/detail?r=16149

Patch Set 1 #

Patch Set 2 : #

Total comments: 5

Patch Set 3 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+109 lines, -4 lines) Patch
M include/dart_api.h View 1 2 2 chunks +20 lines, -0 lines 0 comments Download
M vm/dart_api_impl.cc View 1 2 3 chunks +51 lines, -4 lines 0 comments Download
M vm/dart_api_impl_test.cc View 1 2 2 chunks +38 lines, -0 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
siva
8 years ago (2012-12-13 21:51:19 UTC) #1
cshapiro
lgtm with comments I really dislike the nomenclature and documentation and I think it is ...
8 years ago (2012-12-14 00:00:36 UTC) #2
antonm
Thanks a lot, Siva. https://chromiumcodereview.appspot.com/11580003/diff/5001/include/dart_api.h File include/dart_api.h (right): https://chromiumcodereview.appspot.com/11580003/diff/5001/include/dart_api.h#newcode1471 include/dart_api.h:1471: * until the next call ...
8 years ago (2012-12-14 01:31:59 UTC) #3
siva
addressed comments and changed the API to pass in uint8_t* instead of allocating the buffer ...
8 years ago (2012-12-14 03:30:09 UTC) #4
antonm
8 years ago (2012-12-14 03:31:30 UTC) #5
lgtm

https://chromiumcodereview.appspot.com/11580003/diff/5001/include/dart_api.h
File include/dart_api.h (right):

https://chromiumcodereview.appspot.com/11580003/diff/5001/include/dart_api.h#...
include/dart_api.h:1471: *   until the next call to Dart_ExitScope.
Thanks!

On 2012/12/14 03:30:09, siva wrote:
> I have changed Dart_StringToLatin1 to use the API similar to
Dart_StringToUTF16
> which should be more convenient for you.
> 
> Will try and change Dart_StringToUTF8 to also follow the same pattern in
another
> CL.
> 
> On 2012/12/14 01:31:59, antonm wrote:
> > there are two flavours of string data fetching: Dart_StringToUTF16 which
> allows
> > caller to pass the buffer caller is managing and Dart_String~ToUTF8 where VM
> > allocates the buffer.
> > 
> > From my experience, _StringToUTF16 is by far more convenient as it least in
my
> > case I need to copy those data away immediately anyway and hence I save on
one
> > copy.
>

Powered by Google App Engine
This is Rietveld 408576698