Index: runtime/vm/dart_api_message.cc |
diff --git a/runtime/vm/dart_api_message.cc b/runtime/vm/dart_api_message.cc |
index 64eea311b36bbefba79d1888f3a34d9b83c4fc4d..0cacfa5d9e7ac10f4cf641cc17dc0bc5c909439c 100644 |
--- a/runtime/vm/dart_api_message.cc |
+++ b/runtime/vm/dart_api_message.cc |
@@ -776,7 +776,7 @@ bool ApiMessageWriter::WriteCObjectInlined(Dart_CObject* object, |
} |
Utf8::Type type; |
- intptr_t len = Utf8::CodePointCount(utf8_str, utf8_len, &type); |
+ intptr_t len = Utf8::CodeUnitCount(utf8_str, utf8_len, &type); |
// Write out the serialization header value for this object. |
WriteInlinedHeader(object); |