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

Unified Diff: third_party/WebKit/Source/wtf/InstanceCounter.cpp

Issue 2585673002: Replace ASSERT, ENABLE(ASSERT), and ASSERT_NOT_REACHED in wtf (Closed)
Patch Set: Fix an Asan issue with LinkedHashSetNodeBase::unlink Created 4 years 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 | « third_party/WebKit/Source/wtf/HexNumber.h ('k') | third_party/WebKit/Source/wtf/LinkedHashSet.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/InstanceCounter.cpp
diff --git a/third_party/WebKit/Source/wtf/InstanceCounter.cpp b/third_party/WebKit/Source/wtf/InstanceCounter.cpp
index c5a2dc5d87335128f6dc6113db342d6fc9d6376f..cfffb5208497a6d6016a8f5cdd46b49636a3b3f5 100644
--- a/third_party/WebKit/Source/wtf/InstanceCounter.cpp
+++ b/third_party/WebKit/Source/wtf/InstanceCounter.cpp
@@ -60,8 +60,8 @@ const size_t stringWithTypeNamePostfixLength = sizeof(">(void)") - 1;
String extractTypeNameFromFunctionName(const char* funcName) {
#if COMPILER(CLANG) || COMPILER(GCC) || COMPILER(MSVC)
size_t funcNameLength = strlen(funcName);
- ASSERT(funcNameLength >
- stringWithTypeNamePrefixLength + stringWithTypeNamePostfixLength);
+ DCHECK_GT(funcNameLength,
+ stringWithTypeNamePrefixLength + stringWithTypeNamePostfixLength);
const char* funcNameWithoutPrefix = funcName + stringWithTypeNamePrefixLength;
return String(funcNameWithoutPrefix, funcNameLength -
@@ -116,7 +116,7 @@ void InstanceCounter::decrementInstanceCount(const String& instanceName,
void* ptr) {
MutexLocker locker(m_mutex);
HashMap<String, int>::iterator it = m_counterMap.find(instanceName);
- ASSERT(it != m_counterMap.end());
+ DCHECK(it != m_counterMap.end());
--(it->value);
if (!it->value)
« no previous file with comments | « third_party/WebKit/Source/wtf/HexNumber.h ('k') | third_party/WebKit/Source/wtf/LinkedHashSet.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698