Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1675)

Unified Diff: Source/core/svg/animation/SVGSMILElement.cpp

Issue 1238083002: Oilpan: Move the EventListener hierarchy to Oilpan's heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Source/core/svg/animation/SVGSMILElement.cpp
diff --git a/Source/core/svg/animation/SVGSMILElement.cpp b/Source/core/svg/animation/SVGSMILElement.cpp
index 932e42dcc180d5ae20024f1f577c5b0dd4d40f13..7176ce5d77e0195f2b1e59a7f397720b057c96b6 100644
--- a/Source/core/svg/animation/SVGSMILElement.cpp
+++ b/Source/core/svg/animation/SVGSMILElement.cpp
@@ -107,9 +107,9 @@ static const double invalidCachedTime = -1.;
class ConditionEventListener final : public EventListener {
public:
- static PassRefPtr<ConditionEventListener> create(SVGSMILElement* animation, SVGSMILElement::Condition* condition)
+ static PassRefPtrWillBeRawPtr<ConditionEventListener> create(SVGSMILElement* animation, SVGSMILElement::Condition* condition)
{
- return adoptRef(new ConditionEventListener(animation, condition));
+ return adoptRefWillBeNoop(new ConditionEventListener(animation, condition));
}
static const ConditionEventListener* cast(const EventListener* listener)
@@ -126,6 +126,12 @@ public:
m_animation = nullptr;
}
+ DEFINE_INLINE_VIRTUAL_TRACE()
+ {
+ visitor->trace(m_animation);
+ EventListener::trace(visitor);
+ }
+
private:
ConditionEventListener(SVGSMILElement* animation, SVGSMILElement::Condition* condition)
: EventListener(ConditionEventListenerType)
@@ -136,7 +142,7 @@ private:
void handleEvent(ExecutionContext*, Event*) override;
- SVGSMILElement* m_animation;
+ RawPtrWillBeMember<SVGSMILElement> m_animation;
SVGSMILElement::Condition* m_condition;
};
@@ -154,7 +160,7 @@ void ConditionEventListener::handleEvent(ExecutionContext*, Event* event)
m_animation->handleConditionEvent(event, m_condition);
}
-void SVGSMILElement::Condition::setEventListener(PassRefPtr<ConditionEventListener> eventListener)
+void SVGSMILElement::Condition::setEventListener(PassRefPtrWillBeRawPtr<ConditionEventListener> eventListener)
{
m_eventListener = eventListener;
}
@@ -1346,6 +1352,7 @@ SVGSMILElement::Condition::~Condition()
DEFINE_TRACE(SVGSMILElement::Condition)
{
visitor->trace(m_syncBase);
+ visitor->trace(m_eventListener);
}
DEFINE_TRACE(SVGSMILElement)

Powered by Google App Engine
This is Rietveld 408576698