зеркало из https://github.com/mozilla/pjs.git
Bug 534136 part 4bis: Fix review comments from peterv that should have been in initial patch.
This commit is contained in:
Родитель
70b64e4a8b
Коммит
518102c387
|
@ -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()
|
||||
|
|
Загрузка…
Ссылка в новой задаче