Commit 8b13f2d0 authored by haraken@chromium.org's avatar haraken@chromium.org

Oilpan: Fix SVGElement leaks introduced in 201698

The Persistent handle introduced to SVGInterpolation in 201698 created the following cycle.

SVGInterporation =(Persistent)=>
SVGAnimatedProperty =(Member)=>
SVGElement =(Member)=>
ElementRareData =(Member)=>
ElementAnimations =(part of object)=>
CSSAnimations =(part of object)=>
CSSAnimationUpdate =(Member)=>
NewTransition =(Member)=>
InertEffect =(Member)=>
EffectModel =(RefPtr)=>
InterpolationEffect =(RefPtr)=>
InterpolationRecord =(RefPtr)=>
SVGInterpolation

This CL breaks the cycle by making SVGAnimatedProperty::m_contextElement a raw pointer.

BUG=

Review URL: https://codereview.chromium.org/1325433005

git-svn-id: svn://svn.chromium.org/blink/trunk@201779 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 85ba7315
...@@ -92,7 +92,6 @@ public: ...@@ -92,7 +92,6 @@ public:
DEFINE_INLINE_VIRTUAL_TRACE() DEFINE_INLINE_VIRTUAL_TRACE()
{ {
visitor->trace(m_contextElement);
} }
protected: protected:
...@@ -103,7 +102,22 @@ private: ...@@ -103,7 +102,22 @@ private:
bool m_isReadOnly; bool m_isReadOnly;
// This reference is kept alive from V8 wrapper // This reference is kept alive from V8 wrapper
RawPtrWillBeMember<SVGElement> m_contextElement; // TODO(oilpan): This should be a Member. Currently we cannot do it because
// it creates a cycle as follows:
// SVGInterporation =(Persistent)=>
// SVGAnimatedProperty =(Member)=>
// SVGElement =(Member)=>
// ElementRareData =(Member)=>
// ElementAnimations =(part of object)=>
// CSSAnimations =(part of object)=>
// CSSAnimationUpdate =(Member)=>
// NewTransition =(Member)=>
// InertEffect =(Member)=>
// EffectModel =(RefPtr)=>
// InterpolationEffect =(RefPtr)=>
// InterpolationRecord =(RefPtr)=>
// SVGInterpolation
SVGElement* m_contextElement;
const QualifiedName& m_attributeName; const QualifiedName& m_attributeName;
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment