summaryrefslogtreecommitdiffstats
path: root/base/threading
diff options
context:
space:
mode:
authorkushi.p@gmail.com <kushi.p@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 01:29:38 +0000
committerkushi.p@gmail.com <kushi.p@gmail.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-04 01:29:38 +0000
commite1be56dcd226056bb8af7f82bc1752bb289aa14b (patch)
tree46e3bf1eaa6d8d8c7f5180261643040c51e03e45 /base/threading
parent15a2084decf18de467200317261d2d6c8d5e631b (diff)
downloadchromium_src-e1be56dcd226056bb8af7f82bc1752bb289aa14b.zip
chromium_src-e1be56dcd226056bb8af7f82bc1752bb289aa14b.tar.gz
chromium_src-e1be56dcd226056bb8af7f82bc1752bb289aa14b.tar.bz2
Updating logging in src/base/. Using DCHECK_NE/EQ/LE/GE/GT() where possible
BUG=58409 Review URL: http://codereview.chromium.org/6883295 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84016 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/threading')
-rw-r--r--base/threading/thread_local_posix.cc4
-rw-r--r--base/threading/thread_local_storage_win.cc6
2 files changed, 6 insertions, 4 deletions
diff --git a/base/threading/thread_local_posix.cc b/base/threading/thread_local_posix.cc
index 568fa4b..2071ad8 100644
--- a/base/threading/thread_local_posix.cc
+++ b/base/threading/thread_local_posix.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -21,7 +21,7 @@ void ThreadLocalPlatform::AllocateSlot(SlotType& slot) {
// static
void ThreadLocalPlatform::FreeSlot(SlotType& slot) {
int error = pthread_key_delete(slot);
- DCHECK(error == 0);
+ DCHECK_EQ(0, error);
}
// static
diff --git a/base/threading/thread_local_storage_win.cc b/base/threading/thread_local_storage_win.cc
index c8128f1..90fdcd3 100644
--- a/base/threading/thread_local_storage_win.cc
+++ b/base/threading/thread_local_storage_win.cc
@@ -90,7 +90,8 @@ void* ThreadLocalStorage::Slot::Get() const {
void** tls_data = static_cast<void**>(TlsGetValue(tls_key_));
if (!tls_data)
tls_data = ThreadLocalStorage::Initialize();
- DCHECK(slot_ >= 0 && slot_ < kThreadLocalStorageSize);
+ DCHECK_GE(slot_, 0);
+ DCHECK_LT(slot_, kThreadLocalStorageSize);
return tls_data[slot_];
}
@@ -98,7 +99,8 @@ void ThreadLocalStorage::Slot::Set(void* value) {
void** tls_data = static_cast<void**>(TlsGetValue(tls_key_));
if (!tls_data)
tls_data = ThreadLocalStorage::Initialize();
- DCHECK(slot_ >= 0 && slot_ < kThreadLocalStorageSize);
+ DCHECK_GE(slot_, 0);
+ DCHECK_LT(slot_, kThreadLocalStorageSize);
tls_data[slot_] = value;
}