r vidur
d Javascript should throw an execption on index size error. DOM now throws
an execption for size error.
This commit is contained in:
waqar%netscape.com 1999-11-11 01:48:25 +00:00
Родитель 90900d5452
Коммит fda217b0f1
2 изменённых файлов: 4 добавлений и 4 удалений

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

@ -385,8 +385,8 @@ nsGenericDOMDataNode::ReplaceData(PRUint32 aOffset, PRUint32 aCount,
// sanitize arguments
PRUint32 textLength = mText.GetLength();
if (aOffset > textLength) {
aOffset = textLength;
if ((aOffset > textLength) || (aOffset < 0) || (aCount < 0)) {
return NS_ERROR_DOM_INDEX_SIZE_ERR;
}
// Allocate new buffer

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

@ -385,8 +385,8 @@ nsGenericDOMDataNode::ReplaceData(PRUint32 aOffset, PRUint32 aCount,
// sanitize arguments
PRUint32 textLength = mText.GetLength();
if (aOffset > textLength) {
aOffset = textLength;
if ((aOffset > textLength) || (aOffset < 0) || (aCount < 0)) {
return NS_ERROR_DOM_INDEX_SIZE_ERR;
}
// Allocate new buffer