fixed debug asserts to allow for offset=count, since offsets represent
the slots between content.
This commit is contained in:
Родитель
3a4358dd74
Коммит
6c76015d98
|
@ -72,7 +72,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
|
|||
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad start child list");
|
||||
children->GetLength(&count);
|
||||
}
|
||||
NS_ASSERTION(mStartOffset<count, "bad start offset");
|
||||
NS_ASSERTION(mStartOffset<=count, "bad start offset");
|
||||
|
||||
textNode = mEndParent;
|
||||
if (textNode)
|
||||
|
@ -84,7 +84,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
|
|||
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad end child list");
|
||||
children->GetLength(&count);
|
||||
}
|
||||
NS_ASSERTION(mEndOffset<count, "bad end offset");
|
||||
NS_ASSERTION(mEndOffset<=count, "bad end offset");
|
||||
if (gNoisy)
|
||||
printf ("DeleteRange: %d of %p to %d of %p\n",
|
||||
mStartOffset, (void *)mStartParent, mEndOffset, (void *)mEndParent);
|
||||
|
|
|
@ -72,7 +72,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
|
|||
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad start child list");
|
||||
children->GetLength(&count);
|
||||
}
|
||||
NS_ASSERTION(mStartOffset<count, "bad start offset");
|
||||
NS_ASSERTION(mStartOffset<=count, "bad start offset");
|
||||
|
||||
textNode = mEndParent;
|
||||
if (textNode)
|
||||
|
@ -84,7 +84,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
|
|||
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad end child list");
|
||||
children->GetLength(&count);
|
||||
}
|
||||
NS_ASSERTION(mEndOffset<count, "bad end offset");
|
||||
NS_ASSERTION(mEndOffset<=count, "bad end offset");
|
||||
if (gNoisy)
|
||||
printf ("DeleteRange: %d of %p to %d of %p\n",
|
||||
mStartOffset, (void *)mStartParent, mEndOffset, (void *)mEndParent);
|
||||
|
|
|
@ -72,7 +72,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
|
|||
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad start child list");
|
||||
children->GetLength(&count);
|
||||
}
|
||||
NS_ASSERTION(mStartOffset<count, "bad start offset");
|
||||
NS_ASSERTION(mStartOffset<=count, "bad start offset");
|
||||
|
||||
textNode = mEndParent;
|
||||
if (textNode)
|
||||
|
@ -84,7 +84,7 @@ nsresult DeleteRangeTxn::Init(nsIDOMRange *aRange)
|
|||
NS_ASSERTION(((NS_SUCCEEDED(result)) && children), "bad end child list");
|
||||
children->GetLength(&count);
|
||||
}
|
||||
NS_ASSERTION(mEndOffset<count, "bad end offset");
|
||||
NS_ASSERTION(mEndOffset<=count, "bad end offset");
|
||||
if (gNoisy)
|
||||
printf ("DeleteRange: %d of %p to %d of %p\n",
|
||||
mStartOffset, (void *)mStartParent, mEndOffset, (void *)mEndParent);
|
||||
|
|
Загрузка…
Ссылка в новой задаче