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

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

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/wtf/text/StringImpl.h ('k') | public/web/WebScopedMicrotaskSuppression.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/wtf/text/StringImpl.cpp
diff --git a/Source/wtf/text/StringImpl.cpp b/Source/wtf/text/StringImpl.cpp
index 838b6715fcdce7c992b8a90e4fcfaab69c36ac77..79d878d31f9d85f7636b28663f54d12d41670735 100644
--- a/Source/wtf/text/StringImpl.cpp
+++ b/Source/wtf/text/StringImpl.cpp
@@ -341,7 +341,7 @@ static StaticStringsTable& staticStrings()
return staticStrings;
}
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
static bool s_allowCreationOfStaticStrings = true;
#endif
@@ -354,7 +354,7 @@ void StringImpl::freezeStaticStrings()
{
ASSERT(isMainThread());
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
s_allowCreationOfStaticStrings = false;
#endif
}
@@ -385,7 +385,7 @@ StringImpl* StringImpl::createStatic(const char* string, unsigned length, unsign
LChar* data = reinterpret_cast<LChar*>(impl + 1);
impl = new (impl) StringImpl(length, hash, StaticString);
memcpy(data, string, length * sizeof(LChar));
-#ifndef NDEBUG
+#if ENABLE(ASSERT)
impl->assertHashIsCorrect();
#endif
« no previous file with comments | « Source/wtf/text/StringImpl.h ('k') | public/web/WebScopedMicrotaskSuppression.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698