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

Unified Diff: third_party/WebKit/Source/bindings/core/v8/V8StringResource.h

Issue 2640163004: Replace ENABLE(ASSERT) with DCHECK_IS_ON(). (Closed)
Patch Set: 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
Index: third_party/WebKit/Source/bindings/core/v8/V8StringResource.h
diff --git a/third_party/WebKit/Source/bindings/core/v8/V8StringResource.h b/third_party/WebKit/Source/bindings/core/v8/V8StringResource.h
index c01715d4bfc46943297510069dd6b88dbb98bf0b..b6009b80909e1205bbc48fa438a7ec76782f6e8e 100644
--- a/third_party/WebKit/Source/bindings/core/v8/V8StringResource.h
+++ b/third_party/WebKit/Source/bindings/core/v8/V8StringResource.h
@@ -44,7 +44,7 @@ class WebCoreStringResourceBase {
public:
explicit WebCoreStringResourceBase(const String& string)
: m_plainString(string) {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
m_threadId = WTF::currentThread();
#endif
ASSERT(!string.isNull());
@@ -54,7 +54,7 @@ class WebCoreStringResourceBase {
explicit WebCoreStringResourceBase(const AtomicString& string)
: m_plainString(string.getString()), m_atomicString(string) {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
m_threadId = WTF::currentThread();
#endif
ASSERT(!string.isNull());
@@ -63,7 +63,7 @@ class WebCoreStringResourceBase {
}
virtual ~WebCoreStringResourceBase() {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
ASSERT(m_threadId == WTF::currentThread());
#endif
int64_t reducedExternalMemory = m_plainString.charactersSizeInBytes();
@@ -77,7 +77,7 @@ class WebCoreStringResourceBase {
const String& webcoreString() { return m_plainString; }
const AtomicString& getAtomicString() {
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
ASSERT(m_threadId == WTF::currentThread());
#endif
if (m_atomicString.isNull()) {
@@ -102,7 +102,7 @@ class WebCoreStringResourceBase {
AtomicString m_atomicString;
private:
-#if ENABLE(ASSERT)
+#if DCHECK_IS_ON()
WTF::ThreadIdentifier m_threadId;
#endif
};

Powered by Google App Engine
This is Rietveld 408576698