Chromium Code Reviews| Index: runtime/lib/string.cc |
| diff --git a/runtime/lib/string.cc b/runtime/lib/string.cc |
| index ed1528ed18d5a175e1088820d7c93b8f898675bd..b51bc60d314df9d77a5a2910015516acad6546ac 100644 |
| --- a/runtime/lib/string.cc |
| +++ b/runtime/lib/string.cc |
| @@ -8,6 +8,7 @@ |
| #include "vm/native_entry.h" |
| #include "vm/object.h" |
| #include "vm/symbols.h" |
| +#include "vm/unicode.h" |
| namespace dart { |
| @@ -34,10 +35,10 @@ DEFINE_NATIVE_ENTRY(StringBase_createFromCodePoints, 1) { |
| GrowableArray<const Object*> args; |
| Exceptions::ThrowByType(Exceptions::kArgument, args); |
| } else { |
| - if (value > 0xFF) { |
| + if (!Utf::IsLatin1(value)) { |
| is_one_byte_string = false; |
| } |
| - if (value > 0xFFFF) { |
| + if (!Utf::IsBmp(value)) { |
|
siva
2012/11/30 02:42:53
if (Utf::IsSupplementary(value)) {
...
}
might
cshapiro
2012/11/30 03:21:24
A great idea. Done!
|
| utf16_len += 1; |
| } |
| } |