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

Unified Diff: runtime/vm/unicode.h

Issue 10584044: Check that the C string passed to Dart_NewString is valid UTF-8. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 6 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/unicode.h
diff --git a/runtime/vm/unicode.h b/runtime/vm/unicode.h
index 00e51a1ea786fbdd481ed2c5a04750a19d73bd39..ef6b1e354f269885e0ce247815cf6d01cbf3d876 100644
--- a/runtime/vm/unicode.h
+++ b/runtime/vm/unicode.h
@@ -21,6 +21,8 @@ class Utf8 : AllStatic {
static intptr_t CodePointCount(const char* str, intptr_t* width);
+ static bool IsValid(const char* src);
+
static intptr_t Length(int32_t ch);
static intptr_t Length(const String& str);

Powered by Google App Engine
This is Rietveld 408576698