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

Unified Diff: runtime/vm/scanner.cc

Issue 2304923002: Allow surrogates in string literals. (Closed)
Patch Set: Fixed another test Created 4 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
Index: runtime/vm/scanner.cc
diff --git a/runtime/vm/scanner.cc b/runtime/vm/scanner.cc
index f7ae4ac59525fca9ca450cce9d6fa356af548dbb..cd8abf52caec381b3fd507429e6290fbc8c5e4d8 100644
--- a/runtime/vm/scanner.cc
+++ b/runtime/vm/scanner.cc
@@ -484,9 +484,7 @@ void Scanner::ScanEscapedCodePoint(int32_t* code_point) {
}
}
}
- if (is_valid &&
- ((Utf::IsOutOfRange(*code_point) ||
- (Utf16::IsSurrogate(*code_point))))) {
+ if (is_valid && (Utf::IsOutOfRange(*code_point))) {
ErrorMsg("invalid code point");
}
}

Powered by Google App Engine
This is Rietveld 408576698