Chromium Code Reviews| Index: src/snapshot/deserializer.cc |
| diff --git a/src/snapshot/deserializer.cc b/src/snapshot/deserializer.cc |
| index a670bf796e3deeb08531a9a7d918b1d1642de18c..feb0078e6729f6eeaf9160c01ffc624e47dc9e31 100644 |
| --- a/src/snapshot/deserializer.cc |
| +++ b/src/snapshot/deserializer.cc |
| @@ -172,9 +172,13 @@ MaybeHandle<HeapObject> Deserializer::DeserializeObject(Isolate* isolate) { |
| } |
| Deserializer::~Deserializer() { |
| - // TODO(svenpanne) Re-enable this assertion when v8 initialization is fixed. |
| - // DCHECK(source_.AtEOF()); |
| #ifdef DEBUG |
| + // Do not perform checks if we aborted deserialization. |
| + if (source_.position() == 0) return; |
| + while (source_.HasMore()) { |
| + byte next = source_.Get(); |
| + CHECK_EQ(kNop, next); |
|
vogelheim
2017/03/09 12:21:27
For my understanding: This loop is meant to compen
Yang
2017/03/09 12:22:24
Yes.
|
| + } |
| for (int space = 0; space < kNumberOfPreallocatedSpaces; space++) { |
| int chunk_index = current_chunk_[space]; |
| CHECK_EQ(reservations_[space].length(), chunk_index + 1); |