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

Unified Diff: runtime/vm/scanner.cc

Issue 11414249: Move various top-level Unicode definitions into classes and methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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
Index: runtime/vm/scanner.cc
diff --git a/runtime/vm/scanner.cc b/runtime/vm/scanner.cc
index 26920c656b484a8e34e28110b5ce6fe95d6ddb3e..f969fde067ba35c84a403714ca8f525b18025f8f 100644
--- a/runtime/vm/scanner.cc
+++ b/runtime/vm/scanner.cc
@@ -521,8 +521,8 @@ void Scanner::ScanEscapedCodePoint(int32_t* code_point) {
}
}
if (is_valid &&
- ((*code_point > 0x10FFFF) ||
- ((*code_point & 0xFFFFF800) == 0xD800))) {
+ ((Utf::IsOutOfRange(*code_point) ||
+ (Utf16::IsSurrogate(*code_point))))) {
ErrorMsg("invalid code point");
}
}

Powered by Google App Engine
This is Rietveld 408576698