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

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

Issue 2743663003: Un-DCHECK-guard ThreadRestrictionVerifier for strings. (Closed)
Patch Set: Rebase Created 3 years, 9 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') | no next file » | 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 684b01b4840938a6777ff63fae2ace9b298edf49..dfadf84843254bc684736f8556053d78ecb48e36 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.cpp
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.cpp
@@ -59,13 +59,15 @@ using namespace Unicode;
// As of Jan 2017, StringImpl needs 2 * sizeof(int) + 29 bits of data, and
// sizeof(ThreadRestrictionVerifier) is 16 bytes. Thus, in DCHECK mode the
// class may be padded to 32 bytes.
-#if DCHECK_IS_ON()
+// TODO(meade): Revert this by 17 Mar 17.
+// This is for investigating crbug.com/694520
+// #if DCHECK_IS_ON()
static_assert(sizeof(StringImpl) <= 8 * sizeof(int),
"StringImpl should stay small");
-#else
-static_assert(sizeof(StringImpl) <= 3 * sizeof(int),
- "StringImpl should stay small");
-#endif
+// #else
+// static_assert(sizeof(StringImpl) <= 3 * sizeof(int),
+// "StringImpl should stay small");
+// #endif
#ifdef STRING_STATS
@@ -334,12 +336,14 @@ bool StringImpl::isSafeToSendToAnotherThread() const {
return false;
}
-#if DCHECK_IS_ON()
+// TODO(meade): Revert this by 17 Mar 17.
+// This is for investigating crbug.com/694520
+// #if DCHECK_IS_ON()
std::string StringImpl::asciiForDebugging() const {
CString ascii = String(isolatedCopy()->substring(0, 128)).ascii();
return std::string(ascii.data(), ascii.length());
}
-#endif
+// #endif
PassRefPtr<StringImpl> StringImpl::createUninitialized(unsigned length,
LChar*& data) {
« no previous file with comments | « third_party/WebKit/Source/wtf/text/StringImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698