Index: runtime/vm/dart_api_impl.cc |
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc |
index c69f875919ec8ad09f5cc869a90c2b097dc8965c..f87b47b416d2d69449182bb717961aa4fcc8b6d3 100644 |
--- a/runtime/vm/dart_api_impl.cc |
+++ b/runtime/vm/dart_api_impl.cc |
@@ -1703,7 +1703,7 @@ DART_EXPORT Dart_Handle Dart_StringToUTF16(Dart_Handle str, |
intptr_t str_len = str_obj.Length(); |
intptr_t copy_len = (str_len > *length) ? *length : str_len; |
for (intptr_t i = 0; i < copy_len; i++) { |
- utf16_array[i] = static_cast<uint16_t>(str_obj.CharAt(i)); |
+ utf16_array[i] = static_cast<uint16_t>(str_obj.CodeUnitAt(i)); |
} |
*length = copy_len; |
return Api::Success(isolate); |
@@ -2601,7 +2601,7 @@ DART_EXPORT Dart_Handle Dart_ClassGetFunctionTypeSignature(Dart_Handle clazz) { |
// Outside of the vm, we expose setter names with a trailing '='. |
static bool HasExternalSetterSuffix(const String& name) { |
- return name.CharAt(name.Length() - 1) == '='; |
+ return name.CodeUnitAt(name.Length() - 1) == '='; |
} |