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

Unified Diff: runtime/vm/unicode.cc

Issue 1309373005: Allow individual unicode surrogate strings (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Also fix unicode tests Created 5 years, 3 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/vm/dart_api_impl_test.cc ('k') | runtime/vm/unicode_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/unicode.cc
diff --git a/runtime/vm/unicode.cc b/runtime/vm/unicode.cc
index 615e87b56127c64c6f0d72ebc05d5de8d55e0697..8e1649e91714c5de1f530152318d5264c23f7425 100644
--- a/runtime/vm/unicode.cc
+++ b/runtime/vm/unicode.cc
@@ -102,8 +102,7 @@ bool Utf8::IsValid(const uint8_t* utf8_array, intptr_t array_len) {
if (!((is_malformed == false) &&
(j == num_trail_bytes) &&
!Utf::IsOutOfRange(ch) &&
- !IsNonShortestForm(ch, j) &&
- !Utf16::IsSurrogate(ch))) {
+ !IsNonShortestForm(ch, j))) {
return false;
}
}
@@ -201,8 +200,7 @@ intptr_t Utf8::Decode(const uint8_t* utf8_array,
if (!((is_malformed == false) &&
(i == num_trail_bytes) &&
!Utf::IsOutOfRange(ch) &&
- !IsNonShortestForm(ch, i) &&
- !Utf16::IsSurrogate(ch))) {
+ !IsNonShortestForm(ch, i))) {
*dst = -1;
return 0;
}
« no previous file with comments | « runtime/vm/dart_api_impl_test.cc ('k') | runtime/vm/unicode_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698