diff --git a/layout/style/nsCSSValue.cpp b/layout/style/nsCSSValue.cpp index 5f30efbc529a..a020a68473ca 100644 --- a/layout/style/nsCSSValue.cpp +++ b/layout/style/nsCSSValue.cpp @@ -2775,16 +2775,6 @@ nsCSSValuePairList_heap::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf return n; } -size_t -nsCSSValue::Array::SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const -{ - size_t n = aMallocSizeOf(this); - for (size_t i = 0; i < mCount; i++) { - n += mArray[i].SizeOfExcludingThis(aMallocSizeOf); - } - return n; -} - css::URLValueData::URLValueData(already_AddRefed> aURI, nsStringBuffer* aString, already_AddRefed> aBaseURI, diff --git a/layout/style/nsCSSValue.h b/layout/style/nsCSSValue.h index 1da9e65606ab..ea7c2b35bc0a 100644 --- a/layout/style/nsCSSValue.h +++ b/layout/style/nsCSSValue.h @@ -1117,7 +1117,14 @@ private: } } - size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const; + size_t SizeOfIncludingThis(mozilla::MallocSizeOf aMallocSizeOf) const + { + size_t n = aMallocSizeOf(this); + for (size_t i = 0; i < mCount; i++) { + n += mArray[i].SizeOfExcludingThis(aMallocSizeOf); + } + return n; + } private: Array(const Array& aOther) = delete;