Bug 1729488 - Call malloc_size_of on the derived pointer to avoid ASAN complaints.

MANUAL PUSH: Trivial orange fix CLOSED TREE
This commit is contained in:
Emilio Cobos Álvarez 2021-10-05 20:57:56 +02:00
Родитель f298076046
Коммит 06419ec5b2
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -445,7 +445,7 @@ auto SharedSubResourceCache<Traits, Derived>::Lookup(Loader& aLoader,
template <typename Traits, typename Derived>
size_t SharedSubResourceCache<Traits, Derived>::SizeOfIncludingThis(
MallocSizeOf aMallocSizeOf) const {
size_t n = aMallocSizeOf(this);
size_t n = aMallocSizeOf(&AsDerived());
n += mComplete.ShallowSizeOfExcludingThis(aMallocSizeOf);
for (const auto& data : mComplete.Values()) {