mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-12-14 02:31:59 +00:00
Fixed bug 16609. RemoveNamedItem now returns the correct error code if the attribute doesn't exist. r=pollmann
This commit is contained in:
parent
658e423c71
commit
42cdaa322f
@ -418,14 +418,15 @@ nsDOMAttributeMap::RemoveNamedItem(const nsString& aName, nsIDOMNode** aReturn)
|
||||
|
||||
// Drop the reference held in the hash table
|
||||
NS_RELEASE(attribute);
|
||||
|
||||
// Unset the attribute in the content
|
||||
result = mContent->UnsetAttribute(nameSpaceID, nameAtom, PR_TRUE);
|
||||
}
|
||||
else {
|
||||
result = NS_ERROR_DOM_NOT_FOUND_ERR;
|
||||
*aReturn = nsnull;
|
||||
}
|
||||
|
||||
// Unset the attribute in the content
|
||||
result = mContent->UnsetAttribute(nameSpaceID, nameAtom, PR_TRUE);
|
||||
NS_IF_RELEASE(nameAtom);
|
||||
}
|
||||
}
|
||||
|
@ -418,14 +418,15 @@ nsDOMAttributeMap::RemoveNamedItem(const nsString& aName, nsIDOMNode** aReturn)
|
||||
|
||||
// Drop the reference held in the hash table
|
||||
NS_RELEASE(attribute);
|
||||
|
||||
// Unset the attribute in the content
|
||||
result = mContent->UnsetAttribute(nameSpaceID, nameAtom, PR_TRUE);
|
||||
}
|
||||
else {
|
||||
result = NS_ERROR_DOM_NOT_FOUND_ERR;
|
||||
*aReturn = nsnull;
|
||||
}
|
||||
|
||||
// Unset the attribute in the content
|
||||
result = mContent->UnsetAttribute(nameSpaceID, nameAtom, PR_TRUE);
|
||||
NS_IF_RELEASE(nameAtom);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user