Index: cc/own_ptr_vector.h |
diff --git a/cc/own_ptr_vector.h b/cc/own_ptr_vector.h |
index 196f82107e565c680dc4c9424181b6700c213ebd..69aa6270f83037b3cfecef83ead5d47ec3329d0c 100644 |
--- a/cc/own_ptr_vector.h |
+++ b/cc/own_ptr_vector.h |
@@ -7,6 +7,7 @@ |
#include "base/basictypes.h" |
#include "base/stl_util.h" |
+#include "cc/dcheck.h" |
#include <wtf/PassOwnPtr.h> |
#include <wtf/OwnPtr.h> |
@@ -32,7 +33,7 @@ class OwnPtrVector { |
} |
T* Peek(size_t index) const { |
- ASSERT(index < size()); |
+ CC_DCHECK(index < size()); |
return data_[index]; |
} |
@@ -41,12 +42,12 @@ class OwnPtrVector { |
} |
T* first() const { |
- ASSERT(!isEmpty()); |
+ CC_DCHECK(!isEmpty()); |
return Peek(0); |
} |
T* last() const { |
- ASSERT(!isEmpty()); |
+ CC_DCHECK(!isEmpty()); |
return Peek(size() - 1); |
} |
@@ -55,14 +56,14 @@ class OwnPtrVector { |
} |
PassOwnPtr<T> take(size_t index) { |
- ASSERT(index < size()); |
+ CC_DCHECK(index < size()); |
OwnPtr<T> ret = adoptPtr(data_[index]); |
data_[index] = NULL; |
return ret.release(); |
} |
void remove(size_t index) { |
- ASSERT(index < size()); |
+ CC_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()); |
+ CC_DCHECK(index < size()); |
data_.insert(data_.begin() + index, item.leakPtr()); |
} |