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

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
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart_api_message.cc
===================================================================
--- runtime/vm/dart_api_message.cc (revision 19847)
+++ runtime/vm/dart_api_message.cc (working copy)
@@ -430,7 +430,8 @@
::free(utf16);
return object;
}
- case kUint8ArrayCid: {
+ case kTypedDataUint8ArrayCid:
+ case kExternalTypedDataUint8ArrayCid: {
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;
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698