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

Unified Diff: third_party/WebKit/Source/wtf/Atomics.h

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/ASCIICType.h ('k') | third_party/WebKit/Source/wtf/BitVector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/wtf/Atomics.h
diff --git a/third_party/WebKit/Source/wtf/Atomics.h b/third_party/WebKit/Source/wtf/Atomics.h
index c759e4257985101f821eacd464ca162e119a5838..c1e8c1216a64dcc3a80c7dc9eed1fa189bd3a82f 100644
--- a/third_party/WebKit/Source/wtf/Atomics.h
+++ b/third_party/WebKit/Source/wtf/Atomics.h
@@ -111,12 +111,12 @@ ALWAYS_INLINE int64_t atomicDecrement(int64_t volatile* addend) {
ALWAYS_INLINE int atomicTestAndSetToOne(int volatile* ptr) {
int ret = InterlockedExchange(reinterpret_cast<long volatile*>(ptr), 1);
- ASSERT(!ret || ret == 1);
+ DCHECK(!ret || ret == 1);
return ret;
}
ALWAYS_INLINE void atomicSetOneToZero(int volatile* ptr) {
- ASSERT(*ptr == 1);
+ DCHECK_EQ(*ptr, 1);
InterlockedExchange(reinterpret_cast<long volatile*>(ptr), 0);
}
@@ -163,12 +163,12 @@ ALWAYS_INLINE int64_t atomicDecrement(int64_t volatile* addend) {
ALWAYS_INLINE int atomicTestAndSetToOne(int volatile* ptr) {
int ret = __sync_lock_test_and_set(ptr, 1);
- ASSERT(!ret || ret == 1);
+ DCHECK(!ret || ret == 1);
return ret;
}
ALWAYS_INLINE void atomicSetOneToZero(int volatile* ptr) {
- ASSERT(*ptr == 1);
+ DCHECK_EQ(*ptr, 1);
__sync_lock_release(ptr);
}
#endif
« no previous file with comments | « third_party/WebKit/Source/wtf/ASCIICType.h ('k') | third_party/WebKit/Source/wtf/BitVector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698