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

Unified Diff: src/serialize.cc

Issue 877753007: Reland "Initial switch to Chromium-style CHECK_* and DCHECK_* macros.". (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: VS201x now happy? Created 5 years, 11 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/serialize.h ('k') | src/unique.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/serialize.cc
diff --git a/src/serialize.cc b/src/serialize.cc
index fcc0b190a46a8ca1f0b5f15c29856014ee7e15c3..0b9e9387c382b1c1c47f2c77092973e30695c22e 100644
--- a/src/serialize.cc
+++ b/src/serialize.cc
@@ -95,12 +95,12 @@ void ExternalReferenceTable::Add(Address address,
TypeCode type,
uint16_t id,
const char* name) {
- DCHECK_NE(NULL, address);
+ DCHECK_NOT_NULL(address);
ExternalReferenceEntry entry;
entry.address = address;
entry.code = EncodeExternal(type, id);
entry.name = name;
- DCHECK_NE(0, entry.code);
+ DCHECK_NE(0u, entry.code);
// Assert that the code is added in ascending order to rule out duplicates.
DCHECK((size() == 0) || (code(size() - 1) < entry.code));
refs_.Add(entry);
@@ -647,10 +647,10 @@ bool Deserializer::ReserveSpace() {
void Deserializer::Initialize(Isolate* isolate) {
- DCHECK_EQ(NULL, isolate_);
- DCHECK_NE(NULL, isolate);
+ DCHECK_NULL(isolate_);
+ DCHECK_NOT_NULL(isolate);
isolate_ = isolate;
- DCHECK_EQ(NULL, external_reference_decoder_);
+ DCHECK_NULL(external_reference_decoder_);
external_reference_decoder_ = new ExternalReferenceDecoder(isolate);
}
@@ -659,7 +659,7 @@ void Deserializer::Deserialize(Isolate* isolate) {
Initialize(isolate);
if (!ReserveSpace()) FatalProcessOutOfMemory("deserializing context");
// No active threads.
- DCHECK_EQ(NULL, isolate_->thread_manager()->FirstThreadStateInUse());
+ DCHECK_NULL(isolate_->thread_manager()->FirstThreadStateInUse());
// No active handles.
DCHECK(isolate_->handle_scope_implementer()->blocks()->is_empty());
isolate_->heap()->IterateSmiRoots(this);
@@ -942,7 +942,7 @@ Address Deserializer::Allocate(int space_index, int size) {
} else {
DCHECK(space_index < kNumberOfPreallocatedSpaces);
Address address = high_water_[space_index];
- DCHECK_NE(NULL, address);
+ DCHECK_NOT_NULL(address);
high_water_[space_index] += size;
#ifdef DEBUG
// Assert that the current reserved chunk is still big enough.
@@ -1383,7 +1383,7 @@ Serializer::~Serializer() {
void StartupSerializer::SerializeStrongReferences() {
Isolate* isolate = this->isolate();
// No active threads.
- CHECK_EQ(NULL, isolate->thread_manager()->FirstThreadStateInUse());
+ CHECK_NULL(isolate->thread_manager()->FirstThreadStateInUse());
// No active or weak handles.
CHECK(isolate->handle_scope_implementer()->blocks()->is_empty());
CHECK_EQ(0, isolate->global_handles()->NumberOfWeakHandles());
« no previous file with comments | « src/serialize.h ('k') | src/unique.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698