| Index: src/snapshot/deserializer.cc
|
| diff --git a/src/snapshot/deserializer.cc b/src/snapshot/deserializer.cc
|
| index a670bf796e3deeb08531a9a7d918b1d1642de18c..68e2716e6ff78e902358e8991a999f3939b39cd4 100644
|
| --- a/src/snapshot/deserializer.cc
|
| +++ b/src/snapshot/deserializer.cc
|
| @@ -172,9 +172,11 @@ 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;
|
| + // Check that we only have padding bytes remaining.
|
| + while (source_.HasMore()) CHECK_EQ(kNop, source_.Get());
|
| for (int space = 0; space < kNumberOfPreallocatedSpaces; space++) {
|
| int chunk_index = current_chunk_[space];
|
| CHECK_EQ(reservations_[space].length(), chunk_index + 1);
|
|
|