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

Unified Diff: cc/own_ptr_vector.h

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 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
Index: cc/own_ptr_vector.h
diff --git a/cc/own_ptr_vector.h b/cc/own_ptr_vector.h
index 196f82107e565c680dc4c9424181b6700c213ebd..4e592ee7d70183667ce7e3ca2df164442b8e9ec9 100644
--- a/cc/own_ptr_vector.h
+++ b/cc/own_ptr_vector.h
@@ -6,6 +6,7 @@
#define CC_OWN_PTR_VECTOR_H_
#include "base/basictypes.h"
+#include "base/logging.h"
#include "base/stl_util.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/OwnPtr.h>
@@ -32,7 +33,7 @@ class OwnPtrVector {
}
T* Peek(size_t index) const {
- ASSERT(index < size());
+ DCHECK(index < size());
return data_[index];
}
@@ -41,12 +42,12 @@ class OwnPtrVector {
}
T* first() const {
- ASSERT(!isEmpty());
+ DCHECK(!isEmpty());
return Peek(0);
}
T* last() const {
- ASSERT(!isEmpty());
+ DCHECK(!isEmpty());
return Peek(size() - 1);
}
@@ -55,14 +56,14 @@ class OwnPtrVector {
}
PassOwnPtr<T> take(size_t index) {
- ASSERT(index < size());
+ DCHECK(index < size());
OwnPtr<T> ret = adoptPtr(data_[index]);
data_[index] = NULL;
return ret.release();
}
void remove(size_t index) {
- ASSERT(index < size());
+ DCHECK(index < size());
delete data_[index];
data_.erase(data_.begin() + index);
}
@@ -76,7 +77,7 @@ class OwnPtrVector {
}
void insert(size_t index, PassOwnPtr<T> item) {
- ASSERT(index < size());
+ DCHECK(index < size());
data_.insert(data_.begin() + index, item.leakPtr());
}
« cc/CCCompletionEvent.h ('K') | « cc/cc.gyp ('k') | cc/scoped_ptr_hash_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698