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

Unified Diff: third_party/WebKit/Source/wtf/text/StringImpl.cpp

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 | « third_party/WebKit/Source/wtf/text/StringImpl.h ('k') | third_party/WebKit/Source/wtf/text/WTFString.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/StringImpl.cpp
diff --git a/third_party/WebKit/Source/wtf/text/StringImpl.cpp b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
index 33fdda4d1f6818aa06f101c44415689bcf2a8b6c..641fbc9c72c4b7aeecf2ff0d48498bb7d27e2e20 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.cpp
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
@@ -305,6 +305,13 @@ void StringImpl::destroyIfNotStatic() {
delete this;
}
+void StringImpl::updateContainsOnlyASCII() const {
+ m_containsOnlyASCII = is8Bit()
+ ? charactersAreAllASCII(characters8(), length())
+ : charactersAreAllASCII(characters16(), length());
+ m_needsASCIICheck = false;
+}
+
bool StringImpl::isSafeToSendToAnotherThread() const {
if (isStatic())
return true;
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringImpl.h ('k') | third_party/WebKit/Source/wtf/text/WTFString.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698