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

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

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
Index: third_party/WebKit/Source/wtf/text/StringImpl.h
diff --git a/third_party/WebKit/Source/wtf/text/StringImpl.h b/third_party/WebKit/Source/wtf/text/StringImpl.h
index 97f2c6767bf69b877952e92764be6494d64a0b85..6a9d66c850ef61f88041733a6d782b0dc614fd39 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.h
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.h
@@ -35,9 +35,11 @@
#include <limits.h>
#include <string.h>
-#if DCHECK_IS_ON()
+// TODO(meade): Revert this by 17 Mar 17.
+// This is for investigating crbug.com/694520
+// #if DCHECK_IS_ON()
#include "wtf/ThreadRestrictionVerifier.h"
-#endif
+// #endif
#if OS(MACOSX)
typedef const struct __CFString* CFStringRef;
@@ -307,24 +309,30 @@ class WTF_EXPORT StringImpl {
}
ALWAYS_INLINE bool hasOneRef() const {
-#if DCHECK_IS_ON()
- DCHECK(isStatic() || m_verifier.isSafeToUse()) << asciiForDebugging();
-#endif
+ // TODO(meade): Revert this by 17 Mar 17.
+ // This is for investigating crbug.com/694520
+ // #if DCHECK_IS_ON()
+ CHECK(isStatic() || m_verifier.isSafeToUse()) << asciiForDebugging();
+ // #endif
return m_refCount == 1;
}
ALWAYS_INLINE void ref() const {
-#if DCHECK_IS_ON()
- DCHECK(isStatic() || m_verifier.onRef(m_refCount)) << asciiForDebugging();
-#endif
+ // TODO(meade): Revert this by 17 Mar 17.
+ // This is for investigating crbug.com/694520
+ // #if DCHECK_IS_ON()
+ CHECK(isStatic() || m_verifier.onRef(m_refCount)) << asciiForDebugging();
+ // #endif
++m_refCount;
}
ALWAYS_INLINE void deref() const {
-#if DCHECK_IS_ON()
- DCHECK(isStatic() || m_verifier.onDeref(m_refCount))
+ // TODO(meade): Revert this by 17 Mar 17.
+ // This is for investigating crbug.com/694520
+ // #if DCHECK_IS_ON()
+ CHECK(isStatic() || m_verifier.onDeref(m_refCount))
<< asciiForDebugging() << " " << currentThread();
-#endif
+ // #endif
if (!--m_refCount)
destroyIfNotStatic();
}
@@ -511,9 +519,11 @@ class WTF_EXPORT StringImpl {
void destroyIfNotStatic() const;
void updateContainsOnlyASCII() const;
-#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 asciiForDebugging() const;
-#endif
+// #endif
#ifdef STRING_STATS
static StringStats m_stringStats;
@@ -530,9 +540,11 @@ class WTF_EXPORT StringImpl {
#endif
private:
-#if DCHECK_IS_ON()
+ // TODO(meade): Revert this by 17 Mar 17.
+ // This is for investigating crbug.com/694520
+ // #if DCHECK_IS_ON()
mutable ThreadRestrictionVerifier m_verifier;
-#endif
+ // #endif
mutable unsigned m_refCount;
const unsigned m_length;
mutable unsigned m_hash : 24;
« no previous file with comments | « third_party/WebKit/Source/wtf/ThreadRestrictionVerifier.h ('k') | third_party/WebKit/Source/wtf/text/StringImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698