Bug 534136 part 4bis: Fix review comments from peterv that should have been in initial patch.

This commit is contained in:
Jonas Sicking 2010-03-08 08:03:55 -08:00
Родитель 70b64e4a8b
Коммит 518102c387
2 изменённых файлов: 8 добавлений и 1 удалений

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

@ -51,6 +51,11 @@ nsHtml5Atom::nsHtml5Atom(const nsAString& aString)
CopyUnicodeTo(aString, 0, mString, mLength);
mString[mLength] = PRUnichar(0);
}
NS_ASSERTION(mString[mLength] == PRUnichar(0), "null terminated");
NS_ASSERTION(buf && buf->StorageSize() >= (mLength+1) * sizeof(PRUnichar),
"enough storage");
NS_ASSERTION(Equals(aString), "correct data");
}
nsHtml5Atom::~nsHtml5Atom()

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

@ -269,7 +269,9 @@ AtomImpl::AtomImpl(nsStringBuffer* aStringBuffer, PRUint32 aLength)
aStringBuffer->AddRef();
NS_ASSERTION(mString[mLength] == PRUnichar(0), "null terminated");
NS_ASSERTION(aStringBuffer && aStringBuffer->StorageSize() == (mLength+1) * 2, "correct storage");
NS_ASSERTION(aStringBuffer &&
aStringBuffer->StorageSize() == (mLength+1) * sizeof(PRUnichar),
"correct storage");
}
AtomImpl::~AtomImpl()