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

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

Issue 397733004: Allow assertions to be enabled in Blink Release builds. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased. Created 6 years, 5 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 | « Source/bindings/core/v8/V8RecursionScope.h ('k') | Source/bindings/core/v8/custom/V8BlobCustomHelpers.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/core/v8/V8StringResource.h
diff --git a/Source/bindings/core/v8/V8StringResource.h b/Source/bindings/core/v8/V8StringResource.h
index 3ecfb964131e9bb5c838efb8c7d8ab4ba5bc7d8b..90fe4548eb2de0005bd641f25657df45565f4d42 100644
--- a/Source/bindings/core/v8/V8StringResource.h
+++ b/Source/bindings/core/v8/V8StringResource.h
@@ -42,7 +42,7 @@ public:
explicit WebCoreStringResourceBase(const String& string)
: m_plainString(string)
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_threadId = WTF::currentThread();
#endif
ASSERT(!string.isNull());
@@ -53,7 +53,7 @@ public:
: m_plainString(string.string())
, m_atomicString(string)
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
m_threadId = WTF::currentThread();
#endif
ASSERT(!string.isNull());
@@ -62,7 +62,7 @@ public:
virtual ~WebCoreStringResourceBase()
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(m_threadId == WTF::currentThread());
#endif
int reducedExternalMemory = -memoryConsumption(m_plainString);
@@ -75,7 +75,7 @@ public:
const AtomicString& atomicString()
{
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
ASSERT(m_threadId == WTF::currentThread());
#endif
if (m_atomicString.isNull()) {
@@ -102,7 +102,7 @@ private:
{
return string.length() * (string.is8Bit() ? sizeof(LChar) : sizeof(UChar));
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
WTF::ThreadIdentifier m_threadId;
#endif
};
« no previous file with comments | « Source/bindings/core/v8/V8RecursionScope.h ('k') | Source/bindings/core/v8/custom/V8BlobCustomHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698