Bug 566777: nsSMILMappedAttribute::ClearAnimValue shouldn't do anything if there's no animated value to clear. r=roc

This commit is contained in:
Daniel Holbert 2010-05-19 10:38:05 -07:00
Родитель 51d671b7e0
Коммит d4b7d38e77
1 изменённых файлов: 4 добавлений и 5 удалений

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

@ -145,12 +145,11 @@ nsSMILMappedAttribute::ClearAnimValue()
{
nsRefPtr<nsIAtom> attrName = GetAttrNameAtom();
nsresult rv = mElement->DeleteProperty(SMIL_MAPPED_ATTR_ANIMVAL, attrName);
if (NS_FAILED(rv)) {
// XXXdholbert Can this ever happen? Leaving this warning for now, to
// see if we ever trigger this.
NS_WARNING("couldn't clear animated value (perhaps it wasn't set?)");
if (NS_SUCCEEDED(rv)) {
FlushChangesToTargetAttr();
}
FlushChangesToTargetAttr();
// Else, there's no animated value to be cleared -- no need to flush
// changes, because we didn't change anything.
}
void