Commit 4771c74f authored by haraken@chromium.org's avatar haraken@chromium.org

Oilpan: Fix a cycle caused by SVGPropertyTearOffBase::m_contextElement

For the reason described in the bug, using a Member for SVGPropertyTearOffBase::m_contextElement
causes a cycle. To break the cycle, this CL changes it to a raw pointer.
The raw pointer is safe because the context element is guaranteed to be kept alive
by a V8 wrapper of the SVG tear off object.

BUG=528275

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

git-svn-id: svn://svn.chromium.org/blink/trunk@201796 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 5b49f8f5
...@@ -101,22 +101,9 @@ private: ...@@ -101,22 +101,9 @@ private:
const AnimatedPropertyType m_type; const AnimatedPropertyType m_type;
bool m_isReadOnly; bool m_isReadOnly;
// This reference is kept alive from V8 wrapper // This raw pointer is safe since the SVG element is guaranteed to be kept
// TODO(oilpan): This should be a Member. Currently we cannot do it because // alive by a V8 wrapper.
// it creates a cycle as follows: GC_PLUGIN_IGNORE("crbug.com/528275")
// 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; SVGElement* m_contextElement;
const QualifiedName& m_attributeName; const QualifiedName& m_attributeName;
......
...@@ -98,7 +98,6 @@ public: ...@@ -98,7 +98,6 @@ public:
DEFINE_INLINE_VIRTUAL_TRACE() DEFINE_INLINE_VIRTUAL_TRACE()
{ {
visitor->trace(m_contextElement);
} }
protected: protected:
...@@ -111,8 +110,10 @@ protected: ...@@ -111,8 +110,10 @@ protected:
} }
private: private:
// These references are kept alive from V8 wrapper to prevent reference cycles // This raw pointer is safe since the SVG element is guaranteed to be kept
RawPtrWillBeMember<SVGElement> m_contextElement; // alive by a V8 wrapper.
GC_PLUGIN_IGNORE("crbug.com/528275")
SVGElement* m_contextElement;
PropertyIsAnimValType m_propertyIsAnimVal; PropertyIsAnimValType m_propertyIsAnimVal;
bool m_isReadOnlyProperty; bool m_isReadOnlyProperty;
......
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