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

Unified Diff: src/unicode.h

Issue 1967023004: [wasm] Add UTF-8 validation (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase on parallel compilation Created 4 years, 7 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 | « no previous file | src/unicode.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/unicode.h
diff --git a/src/unicode.h b/src/unicode.h
index 7471a638c045d169e58bceae78087615b06202a9..35717bca868da4e17bff98ee7012932c7149b599 100644
--- a/src/unicode.h
+++ b/src/unicode.h
@@ -155,6 +155,11 @@ class Utf8 {
// UTF-8.
static const unsigned kMax16BitCodeUnitSize = 3;
static inline uchar ValueOf(const byte* str, size_t length, size_t* cursor);
+
+ // Excludes non-characters from the set of valid code points.
+ static inline bool IsValidCharacter(uchar c);
+
+ static bool Validate(const byte* str, size_t length);
};
struct Uppercase {
« no previous file with comments | « no previous file | src/unicode.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698