Index: Source/core/svg/SVGElementInstance.cpp |
diff --git a/Source/core/svg/SVGElementInstance.cpp b/Source/core/svg/SVGElementInstance.cpp |
index b30d43aeb9e83067ff67cfe2bed8e3d3054df482..a2370e805565c819df2a698e7b8a6a87ec12cb13 100644 |
--- a/Source/core/svg/SVGElementInstance.cpp |
+++ b/Source/core/svg/SVGElementInstance.cpp |
@@ -86,14 +86,14 @@ PassRefPtr<SVGElementInstance> SVGElementInstance::create(SVGUseElement* corresp |
} |
SVGElementInstance::SVGElementInstance(SVGUseElement* correspondingUseElement, SVGUseElement* directUseElement, PassRefPtr<SVGElement> originalElement) |
- : m_parentInstance(0) |
+ : m_parentInstance(nullptr) |
, m_correspondingUseElement(correspondingUseElement) |
, m_directUseElement(directUseElement) |
, m_element(originalElement) |
- , m_previousSibling(0) |
- , m_nextSibling(0) |
- , m_firstChild(0) |
- , m_lastChild(0) |
+ , m_previousSibling(nullptr) |
+ , m_nextSibling(nullptr) |
+ , m_firstChild(nullptr) |
+ , m_lastChild(nullptr) |
{ |
ASSERT(m_correspondingUseElement); |
ASSERT(m_element); |
@@ -106,14 +106,15 @@ SVGElementInstance::SVGElementInstance(SVGUseElement* correspondingUseElement, S |
SVGElementInstance::~SVGElementInstance() |
{ |
- // Call detach because we may be deleted directly if we are a child of a detached instance. |
- detach(); |
- |
#ifndef NDEBUG |
instanceCounter.decrement(); |
#endif |
+#if !ENABLE(OILPAN) |
+ // Call detach because we may be deleted directly if we are a child of a detached instance. |
+ detach(); |
m_element = nullptr; |
+#endif |
} |
// It's important not to inline removedLastRef, because we don't want to inline the code to |
@@ -146,7 +147,9 @@ void SVGElementInstance::detach() |
m_directUseElement = 0; |
m_correspondingUseElement = 0; |
+#if !ENABLE(OILPAN) |
haraken
2014/05/06 15:59:42
Can detach() be called in oilpan bulids? If no, yo
Mads Ager (chromium)
2014/05/07 12:13:16
Yes, it can be called via the SVGUseElement.
|
removeDetachedChildrenInContainer<SVGElementInstance, SVGElementInstance>(*this); |
+#endif |
} |
void SVGElementInstance::setShadowTreeElement(SVGElement* element) |
@@ -221,4 +224,15 @@ EventTargetData& SVGElementInstance::ensureEventTargetData() |
return *eventTargetData(); |
} |
+void SVGElementInstance::trace(Visitor* visitor) |
+{ |
+ visitor->trace(m_parentInstance); |
+ visitor->trace(m_element); |
+ visitor->trace(m_shadowTreeElement); |
+ visitor->trace(m_previousSibling); |
+ visitor->trace(m_nextSibling); |
+ visitor->trace(m_firstChild); |
+ visitor->trace(m_lastChild); |
+} |
+ |
} |