Bug 1815558 - Downgrade nsDependentString assert. r=smaug

I saw this in the nightly profile. This makes us go into the string
which in most cases is not necessary because the lengths are different.

Depends on D169143

Differential Revision: https://phabricator.services.mozilla.com/D169144
This commit is contained in:
Emilio Cobos Álvarez 2023-02-08 00:55:19 +00:00
Родитель 434c464e76
Коммит 38fce4f9a3
1 изменённых файлов: 3 добавлений и 4 удалений

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

@ -201,10 +201,9 @@ class nsTString : public nsTSubstring<T> {
*/
void AssertValidDependentString() {
MOZ_ASSERT(this->mData, "nsTDependentString must wrap a non-NULL buffer");
MOZ_DIAGNOSTIC_ASSERT(this->mData[substring_type::mLength] == 0,
"nsTDependentString must wrap only null-terminated "
"strings. You are probably looking for "
"nsTDependentSubstring.");
MOZ_ASSERT(this->mData[substring_type::mLength] == 0,
"nsTDependentString must wrap only null-terminated strings. "
"You are probably looking for nsTDependentSubstring.");
}
protected: