Bug 1239945 part 4 - Remove the pointer from an AnimationCollection to its manager since it is no longer used; r=dholbert

This commit is contained in:
Brian Birtles 2016-02-24 16:08:56 +09:00
parent 5413ebdb9d
commit f6ce89fead
2 changed files with 2 additions and 7 deletions

View File

@ -21,16 +21,13 @@ class nsPresContext;
namespace mozilla {
class CommonAnimationManager;
typedef InfallibleTArray<RefPtr<dom::Animation>> AnimationPtrArray;
struct AnimationCollection : public LinkedListElement<AnimationCollection>
{
AnimationCollection(dom::Element *aElement, nsIAtom *aElementProperty,
CommonAnimationManager *aManager)
AnimationCollection(dom::Element* aElement, nsIAtom* aElementProperty)
: mElement(aElement)
, mElementProperty(aElementProperty)
, mManager(aManager)
, mCheckGeneration(0)
#ifdef DEBUG
, mCalledPropertyDtor(false)
@ -92,8 +89,6 @@ public:
// i.e., in an atom list)
nsIAtom *mElementProperty;
CommonAnimationManager *mManager;
AnimationPtrArray mAnimations;
// For CSS transitions only, we record the most recent generation

View File

@ -92,7 +92,7 @@ CommonAnimationManager::GetAnimationCollection(dom::Element *aElement,
static_cast<AnimationCollection*>(aElement->GetProperty(propName));
if (!collection && aCreateIfNeeded) {
// FIXME: Consider arena-allocating?
collection = new AnimationCollection(aElement, propName, this);
collection = new AnimationCollection(aElement, propName);
nsresult rv =
aElement->SetProperty(propName, collection,
&AnimationCollection::PropertyDtor, false);