Bug 1183893 - Remove warning if invalid node type is passed to nsRange::SetEnd. r=smaug

This commit is contained in:
Eric Rahm 2015-07-14 17:54:58 -07:00
parent 1657fb5426
commit 60e6aac9a5

View File

@ -1230,7 +1230,9 @@ nsRange::SetEnd(nsIDOMNode* aParent, int32_t aOffset)
nsRange::SetEnd(nsINode* aParent, int32_t aOffset)
{
nsINode* newRoot = IsValidBoundary(aParent);
NS_ENSURE_TRUE(newRoot, NS_ERROR_DOM_INVALID_NODE_TYPE_ERR);
if (!newRoot) {
return NS_ERROR_DOM_INVALID_NODE_TYPE_ERR;
}
if (aOffset < 0 || uint32_t(aOffset) > aParent->Length()) {
return NS_ERROR_DOM_INDEX_SIZE_ERR;