Index: src/snapshot/deserializer.cc |
diff --git a/src/snapshot/deserializer.cc b/src/snapshot/deserializer.cc |
index d7b99858d8aea590d6ddcfbc8aec3e5e7eb71cd6..91b47c54d437ade556290980489295811c8d6fb0 100644 |
--- a/src/snapshot/deserializer.cc |
+++ b/src/snapshot/deserializer.cc |
@@ -364,14 +364,15 @@ void Deserializer::ReadObject(int space_number, Object** write_back) { |
isolate_->heap()->OnAllocationEvent(obj, size); |
Object** current = reinterpret_cast<Object**>(address); |
Object** limit = current + (size >> kPointerSizeLog2); |
- if (FLAG_log_snapshot_positions) { |
- LOG(isolate_, SnapshotPositionEvent(address, source_.position())); |
- } |
+ int position = source_.position(); |
if (ReadData(current, limit, space_number, address)) { |
// Only post process if object content has not been deferred. |
obj = PostProcessNewObject(obj, space_number); |
} |
+ if (FLAG_log_snapshot_positions) { |
+ LOG(isolate_, SnapshotPositionEvent(obj, position)); |
+ } |
Object* write_back_obj = obj; |
UnalignedCopy(write_back, &write_back_obj); |