Commit f88fd7c5 authored by Leszek Swirski's avatar Leszek Swirski Committed by Commit Bot

[serializer] Zero-initialize allocation counter

Add an initializer to the Serializer::allocation_size_ field so that the
array is value-initialized to zero.

Change-Id: I3bd9ecae63d9083e41cce4fbbfedc36ff5f0f741
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2502868
Auto-Submit: Leszek Swirski <leszeks@chromium.org>
Commit-Queue: Jakob Gruber <jgruber@chromium.org>
Reviewed-by: 's avatarJakob Gruber <jgruber@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70800}
parent 213152dd
......@@ -369,7 +369,7 @@ class Serializer : public SerializerDeserializer {
int recursion_depth_ = 0;
const Snapshot::SerializerFlags flags_;
size_t allocation_size_[kNumberOfSnapshotSpaces];
size_t allocation_size_[kNumberOfSnapshotSpaces] = {0};
#ifdef OBJECT_PRINT
static constexpr int kInstanceTypes = LAST_TYPE + 1;
std::unique_ptr<int[]> instance_type_count_[kNumberOfSnapshotSpaces];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment