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

Unified Diff: runtime/vm/dart_api_message.cc

Issue 12730013: - Use dart:typedata types in the Dart API calls. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: runtime/vm/dart_api_message.cc
===================================================================
--- runtime/vm/dart_api_message.cc (revision 19764)
+++ runtime/vm/dart_api_message.cc (working copy)
@@ -430,7 +430,8 @@
::free(utf16);
return object;
}
- case kUint8ArrayCid: {
+ case kTypedDataUint8ArrayCid:
+ case kExternalTypedDataUint8ArrayCid: {
Anton Muhin 2013/03/12 08:31:46 I am not familiar with this part of the system, bu
Mads Ager (google) 2013/03/12 08:36:17 This is a bit complicated. The data is not seriali
intptr_t len = ReadSmiValue();
Dart_CObject* object = AllocateDartCObjectUint8Array(len);
AddBackRef(object_id, object, kIsDeserialized);
@@ -846,8 +847,9 @@
// Write out the serialization header value for this object.
WriteInlinedHeader(object);
// Write out the class and tags information.
- WriteIndexedObject(kUint8ArrayCid);
- WriteIntptrValue(0);
+ WriteIndexedObject(kTypedDataUint8ArrayCid);
+ WriteIntptrValue(RawObject::ClassIdTag::update(
+ kTypedDataUint8ArrayCid, 0));
uint8_t* bytes = object->value.as_byte_array.values;
intptr_t len = object->value.as_byte_array.length;
WriteSmi(len);
@@ -865,8 +867,9 @@
// Write out serialization header value for this object.
WriteInlinedHeader(object);
// Write out the class and tag information.
- WriteIndexedObject(kExternalUint8ArrayCid);
- WriteIntptrValue(0);
+ WriteIndexedObject(kExternalTypedDataUint8ArrayCid);
+ WriteIntptrValue(RawObject::ClassIdTag::update(
+ kExternalTypedDataUint8ArrayCid, 0));
int length = object->value.as_external_byte_array.length;
uint8_t* data = object->value.as_external_byte_array.data;
void* peer = object->value.as_external_byte_array.peer;

Powered by Google App Engine
This is Rietveld 408576698