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

Unified Diff: third_party/WebKit/Source/wtf/text/ASCIIFastPath.h

Issue 2585063002: Cache contains only ascii in StringImpl (Closed)
Patch Set: DCHECK + static_Cast Created 3 years, 11 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 | third_party/WebKit/Source/wtf/text/StringImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/text/ASCIIFastPath.h
diff --git a/third_party/WebKit/Source/wtf/text/ASCIIFastPath.h b/third_party/WebKit/Source/wtf/text/ASCIIFastPath.h
index b167a322152ad1d9d313d89c78c5377b19759674..2f3433f5e4925fd5ab3fba4acbd22676efa25750 100644
--- a/third_party/WebKit/Source/wtf/text/ASCIIFastPath.h
+++ b/third_party/WebKit/Source/wtf/text/ASCIIFastPath.h
@@ -78,6 +78,7 @@ inline bool isAllASCII(MachineWord word) {
template <typename CharacterType>
inline bool charactersAreAllASCII(const CharacterType* characters,
size_t length) {
+ DCHECK_GT(length, 0u);
MachineWord allCharBits = 0;
const CharacterType* end = characters + length;
« no previous file with comments | « no previous file | third_party/WebKit/Source/wtf/text/StringImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698