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

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

Issue 2753953002: Revert of Un-DCHECK-guard ThreadRestrictionVerifier for strings. (Closed)
Patch Set: 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 6a9d66c850ef61f88041733a6d782b0dc614fd39..97f2c6767bf69b877952e92764be6494d64a0b85 100644
--- a/third_party/WebKit/Source/wtf/text/StringImpl.h
+++ b/third_party/WebKit/Source/wtf/text/StringImpl.h
@@ -35,11 +35,9 @@
#include <limits.h>
#include <string.h>
-// TODO(meade): Revert this by 17 Mar 17.
-// This is for investigating crbug.com/694520
-// #if DCHECK_IS_ON()
+#if DCHECK_IS_ON()
#include "wtf/ThreadRestrictionVerifier.h"
-// #endif
+#endif
#if OS(MACOSX)
typedef const struct __CFString* CFStringRef;
@@ -309,30 +307,24 @@
}
ALWAYS_INLINE bool hasOneRef() const {
- // 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
+#if DCHECK_IS_ON()
+ DCHECK(isStatic() || m_verifier.isSafeToUse()) << asciiForDebugging();
+#endif
return m_refCount == 1;
}
ALWAYS_INLINE void ref() const {
- // 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
+#if DCHECK_IS_ON()
+ DCHECK(isStatic() || m_verifier.onRef(m_refCount)) << asciiForDebugging();
+#endif
++m_refCount;
}
ALWAYS_INLINE void deref() const {
- // 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))
+#if DCHECK_IS_ON()
+ DCHECK(isStatic() || m_verifier.onDeref(m_refCount))
<< asciiForDebugging() << " " << currentThread();
- // #endif
+#endif
if (!--m_refCount)
destroyIfNotStatic();
}
@@ -519,11 +511,9 @@
void destroyIfNotStatic() const;
void updateContainsOnlyASCII() const;
- // TODO(meade): Revert this by 17 Mar 17.
- // This is for investigating crbug.com/694520
- // #if DCHECK_IS_ON()
+#if DCHECK_IS_ON()
std::string asciiForDebugging() const;
-// #endif
+#endif
#ifdef STRING_STATS
static StringStats m_stringStats;
@@ -540,11 +530,9 @@
#endif
private:
- // TODO(meade): Revert this by 17 Mar 17.
- // This is for investigating crbug.com/694520
- // #if DCHECK_IS_ON()
+#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