diff --git a/src/profile-generator.cc b/src/profile-generator.cc index 216dc8dcec..ca19f4aaaf 100644 --- a/src/profile-generator.cc +++ b/src/profile-generator.cc @@ -1261,8 +1261,8 @@ static size_t GetMemoryUsedByList(const List& list) { size_t HeapSnapshot::RawSnapshotSize() const { - STATIC_CHECK(sizeof(*this) == - SnapshotSizeConstants::kExpectedHeapSnapshotSize); + STATIC_CHECK(SnapshotSizeConstants::kExpectedHeapSnapshotSize == + sizeof(HeapSnapshot)); // NOLINT return sizeof(*this) + GetMemoryUsedByList(entries_) + @@ -1551,9 +1551,9 @@ Handle HeapSnapshotsCollection::FindHeapObjectById( size_t HeapSnapshotsCollection::GetUsedMemorySize() const { - STATIC_CHECK( - sizeof(*this) == SnapshotSizeConstants:: - kExpectedHeapSnapshotsCollectionSize); + STATIC_CHECK(SnapshotSizeConstants:: + kExpectedHeapSnapshotsCollectionSize == + sizeof(HeapSnapshotsCollection)); // NOLINT size_t size = sizeof(*this); size += names_.GetUsedMemorySize(); size += ids_.GetUsedMemorySize();