Bug 1225365 - Fix assertion in the nsScriptNameSpaceManager memory reporter. r=bz.

Also, use a fatal assertion in
nsStringBuffer::SizeOfIncludingThisMustBeUnshared().

--HG--
extra : rebase_source : ba35e67fa00dab55e509970e567116f52aee17ee
This commit is contained in:
Nicholas Nethercote 2015-11-17 14:46:46 -08:00
parent f659df0ca3
commit 4e44ab2954
2 changed files with 3 additions and 3 deletions

View File

@ -91,7 +91,7 @@ public:
// Measurement of the following members may be added later if DMD finds it
// is worthwhile:
// - mGlobalName
return mKey.SizeOfExcludingThisMustBeUnshared(aMallocSizeOf);
return mKey.SizeOfExcludingThisIfUnshared(aMallocSizeOf);
}
};

View File

@ -319,8 +319,8 @@ nsStringBuffer::ToString(uint32_t aLen, nsACString& aStr,
size_t
nsStringBuffer::SizeOfIncludingThisMustBeUnshared(mozilla::MallocSizeOf aMallocSizeOf) const
{
NS_ASSERTION(!IsReadonly(),
"shared StringBuffer in SizeOfIncludingThisMustBeUnshared");
MOZ_ASSERT(!IsReadonly(),
"shared StringBuffer in SizeOfIncludingThisMustBeUnshared");
return aMallocSizeOf(this);
}