Bug 752902 - Call Unlink before clearing time value specs; r=dholbert
authorBrian Birtles <birtles@gmail.com>
Wed, 23 May 2012 08:21:23 +0900
changeset 94634 003306c4fe88b9c19e4d637759912538e8a215c0
parent 94633 dada4ba871648597e379d77e9a8c61fc7a6d0c25
child 94635 0cf1ff867a37af8709fe32956420c94a40f1c49c
push id22732
push useremorley@mozilla.com
push dateWed, 23 May 2012 09:43:13 +0000
treeherdermozilla-central@aa2b52bd0374 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdholbert
bugs752902
milestone15.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 752902 - Call Unlink before clearing time value specs; r=dholbert
content/smil/nsSMILTimedElement.cpp
--- a/content/smil/nsSMILTimedElement.cpp
+++ b/content/smil/nsSMILTimedElement.cpp
@@ -1307,17 +1307,23 @@ namespace
   };
 }
 
 void
 nsSMILTimedElement::ClearSpecs(TimeValueSpecList& aSpecs,
                                InstanceTimeList& aInstances,
                                RemovalTestFunction aRemove)
 {
+  AutoIntervalUpdateBatcher(*this);
+
+  for (PRUint32 i = 0; i < aSpecs.Length(); ++i) {
+    aSpecs[i]->Unlink();
+  }
   aSpecs.Clear();
+
   RemoveByFunction removeByFunction(aRemove);
   RemoveInstanceTimes(aInstances, removeByFunction);
 }
 
 void
 nsSMILTimedElement::ClearIntervals()
 {
   if (mElementState != STATE_STARTUP) {