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

Unified Diff: src/utils.cc

Issue 430503007: Rename ASSERT* to DCHECK*. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: REBASE and fixes Created 6 years, 4 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
« no previous file with comments | « src/utils.h ('k') | src/v8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils.cc
diff --git a/src/utils.cc b/src/utils.cc
index aca9a9956e94ff8c7cc23a80fd0207220bb3d5ea..165855a3ab56687287c90d13e638c5d7a757cb0f 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -27,8 +27,8 @@ void SimpleStringBuilder::AddString(const char* s) {
void SimpleStringBuilder::AddSubstring(const char* s, int n) {
- ASSERT(!is_finalized() && position_ + n <= buffer_.length());
- ASSERT(static_cast<size_t>(n) <= strlen(s));
+ DCHECK(!is_finalized() && position_ + n <= buffer_.length());
+ DCHECK(static_cast<size_t>(n) <= strlen(s));
MemCopy(&buffer_[position_], s, n * kCharSize);
position_ += n;
}
@@ -60,7 +60,7 @@ void SimpleStringBuilder::AddDecimalInteger(int32_t value) {
char* SimpleStringBuilder::Finalize() {
- ASSERT(!is_finalized() && position_ <= buffer_.length());
+ DCHECK(!is_finalized() && position_ <= buffer_.length());
// If there is no space for null termination, overwrite last character.
if (position_ == buffer_.length()) {
position_--;
@@ -70,9 +70,9 @@ char* SimpleStringBuilder::Finalize() {
buffer_[position_] = '\0';
// Make sure nobody managed to add a 0-character to the
// buffer while building the string.
- ASSERT(strlen(buffer_.start()) == static_cast<size_t>(position_));
+ DCHECK(strlen(buffer_.start()) == static_cast<size_t>(position_));
position_ = -1;
- ASSERT(is_finalized());
+ DCHECK(is_finalized());
return buffer_.start();
}
@@ -172,7 +172,7 @@ char* ReadLine(const char* prompt) {
MemCopy(result + offset, line_buf, len * kCharSize);
offset += len;
}
- ASSERT(result != NULL);
+ DCHECK(result != NULL);
result[offset] = '\0';
return result;
}
@@ -323,7 +323,7 @@ void StringBuilder::AddFormatted(const char* format, ...) {
void StringBuilder::AddFormattedList(const char* format, va_list list) {
- ASSERT(!is_finalized() && position_ <= buffer_.length());
+ DCHECK(!is_finalized() && position_ <= buffer_.length());
int n = VSNPrintF(buffer_ + position_, format, list);
if (n < 0 || n >= (buffer_.length() - position_)) {
position_ = buffer_.length();
« no previous file with comments | « src/utils.h ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698