tests/content/smil/test/test_smilMappedAttr* spew warnings

RESOLVED FIXED

Status

()

defect
RESOLVED FIXED
9 years ago
9 years ago

People

(Reporter: zwol, Assigned: dholbert)

Tracking

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

All three of the test_smilMappedAttr* tests spew this warning in a debug build:

WARNING: couldn't clear animated value (perhaps it wasn't set?): file /home/zack/src/mozilla/moz-central/content/smil/nsSMILMappedAttribute.cpp, line 151

The offending code is

  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?)");
  }

so, um, yes, it does happen ...
Yeah, I've noticed this spam too -- sorry for not having already fixed it.  I think it happens in particular when we're dealing with invalid values, or when compositing fails for some other reason -- then, no animated value gets set.  And then when we go to clear the animated value, there's nothing there, and we spam this warning.

This warning should just go away.
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
OS: Linux → All
Hardware: x86 → All
Version: unspecified → Trunk
Posted patch fixSplinter Review
This removes the warning, and moves the "FlushChangesToTargetAttr()" call to only happen if we actually did anything.  (If there was no animated value to be cleared, then we don't need to notify anybody about our failed attempt at clearing it.)
Attachment #446154 - Flags: review?(roc)
Maybe expand your 'else' comment with the information from comment 1?
Blocks: 534028
landed, with expanded comment per jwatt's suggestion:
http://hg.mozilla.org/mozilla-central/rev/a098c34c441c
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.