Index: test/cctest/test-spaces.cc |
diff --git a/test/cctest/test-spaces.cc b/test/cctest/test-spaces.cc |
index 16ba98f2fba1bc77ab32cc8f1388476357b60f94..ec5d70404d8398bba26cdd681fd6312d345e5db8 100644 |
--- a/test/cctest/test-spaces.cc |
+++ b/test/cctest/test-spaces.cc |
@@ -169,7 +169,7 @@ static void VerifyMemoryChunk(Isolate* isolate, |
commit_area_size, |
executable, |
NULL); |
- size_t alignment = code_range->exists() ? |
+ size_t alignment = code_range != NULL && code_range->valid() ? |
MemoryChunk::kAlignment : OS::CommitPageSize(); |
size_t reserved_size = ((executable == EXECUTABLE)) |
? RoundUp(header_size + guard_size + reserve_area_size + guard_size, |