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

Unified Diff: samples/sample_extension/sample_extension.cc

Issue 14046011: Fix wrong ASSERT (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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/bin/dartutils.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: samples/sample_extension/sample_extension.cc
diff --git a/samples/sample_extension/sample_extension.cc b/samples/sample_extension/sample_extension.cc
index 2ca07f8a348f3d8affed6af3fd99c058c1fa4b76..5da20954cc3e1b78370545b5a3ebf5aeb2b534e4 100644
--- a/samples/sample_extension/sample_extension.cc
+++ b/samples/sample_extension/sample_extension.cc
@@ -75,9 +75,10 @@ void wrappedRandomArray(Dart_Port dest_port_id,
if (values != NULL) {
Dart_CObject result;
- result.type = Dart_CObject::kUint8Array;
- result.value.as_byte_array.values = values;
- result.value.as_byte_array.length = length;
+ result.type = Dart_CObject::kTypedData;
+ result.value.as_typed_data.type = Dart_CObject::kUint8Array;
+ result.value.as_typed_data.values = values;
+ result.value.as_typed_data.length = length;
Dart_PostCObject(reply_port_id, &result);
free(values);
// It is OK that result is destroyed when function exits.
« no previous file with comments | « runtime/bin/dartutils.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698