| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/dart_api_message.h" | 5 #include "vm/dart_api_message.h" |
| 6 #include "vm/object.h" | 6 #include "vm/object.h" |
| 7 #include "vm/snapshot_ids.h" | 7 #include "vm/snapshot_ids.h" |
| 8 #include "vm/symbols.h" | 8 #include "vm/symbols.h" |
| 9 #include "vm/unicode.h" | 9 #include "vm/unicode.h" |
| 10 | 10 |
| (...skipping 852 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 863 // to other processes. | 863 // to other processes. |
| 864 | 864 |
| 865 // Write out serialization header value for this object. | 865 // Write out serialization header value for this object. |
| 866 WriteInlinedHeader(object); | 866 WriteInlinedHeader(object); |
| 867 // Write out the class and tag information. | 867 // Write out the class and tag information. |
| 868 WriteIndexedObject(kExternalUint8ArrayCid); | 868 WriteIndexedObject(kExternalUint8ArrayCid); |
| 869 WriteIntptrValue(0); | 869 WriteIntptrValue(0); |
| 870 int length = object->value.as_external_byte_array.length; | 870 int length = object->value.as_external_byte_array.length; |
| 871 uint8_t* data = object->value.as_external_byte_array.data; | 871 uint8_t* data = object->value.as_external_byte_array.data; |
| 872 void* peer = object->value.as_external_byte_array.peer; | 872 void* peer = object->value.as_external_byte_array.peer; |
| 873 Dart_PeerFinalizer callback = | 873 Dart_WeakPersistentHandleFinalizer callback = |
| 874 object->value.as_external_byte_array.callback; | 874 object->value.as_external_byte_array.callback; |
| 875 WriteSmi(length); | 875 WriteSmi(length); |
| 876 WriteIntptrValue(reinterpret_cast<intptr_t>(data)); | 876 WriteIntptrValue(reinterpret_cast<intptr_t>(data)); |
| 877 WriteIntptrValue(reinterpret_cast<intptr_t>(peer)); | 877 WriteIntptrValue(reinterpret_cast<intptr_t>(peer)); |
| 878 WriteIntptrValue(reinterpret_cast<intptr_t>(callback)); | 878 WriteIntptrValue(reinterpret_cast<intptr_t>(callback)); |
| 879 break; | 879 break; |
| 880 } | 880 } |
| 881 default: | 881 default: |
| 882 UNREACHABLE(); | 882 UNREACHABLE(); |
| 883 } | 883 } |
| (...skipping 16 matching lines...) Expand all Loading... |
| 900 if (!success) { | 900 if (!success) { |
| 901 UnmarkAllCObjects(object); | 901 UnmarkAllCObjects(object); |
| 902 return false; | 902 return false; |
| 903 } | 903 } |
| 904 } | 904 } |
| 905 UnmarkAllCObjects(object); | 905 UnmarkAllCObjects(object); |
| 906 return true; | 906 return true; |
| 907 } | 907 } |
| 908 | 908 |
| 909 } // namespace dart | 909 } // namespace dart |
| OLD | NEW |