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

Unified Diff: Source/core/svg/SVGElementInstance.cpp

Issue 267303004: Oilpan: cleanup based on review comments after removal of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix typo and merge Created 6 years, 7 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
« no previous file with comments | « Source/core/svg/SVGElementInstance.h ('k') | Source/core/svg/SVGElementRareData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/svg/SVGElementInstance.cpp
diff --git a/Source/core/svg/SVGElementInstance.cpp b/Source/core/svg/SVGElementInstance.cpp
index b4c08892a3cf68bcc6412a077ec264f89fb8f438..752f4826415236708ef14fa9094bb23d8ecf8712 100644
--- a/Source/core/svg/SVGElementInstance.cpp
+++ b/Source/core/svg/SVGElementInstance.cpp
@@ -119,15 +119,15 @@ SVGElementInstance::~SVGElementInstance()
// It's important not to inline removedLastRef, because we don't want to inline the code to
// delete an SVGElementInstance at each deref call site.
+#if !ENABLE(OILPAN)
void SVGElementInstance::removedLastRef()
{
-#if !ENABLE(OILPAN)
#if SECURITY_ASSERT_ENABLED
m_deletionHasBegun = true;
#endif
delete this;
-#endif
}
+#endif
void SVGElementInstance::detach()
{
@@ -140,12 +140,11 @@ void SVGElementInstance::detach()
// Deregister as instance for passed element, if we haven't already.
if (shadowTreeElement() && m_element->instancesForElement().contains(shadowTreeElement()))
m_element->removeInstanceMapping(shadowTreeElement());
- // DO NOT clear ref to m_element because JavaScriptCore uses it for garbage collection
m_shadowTreeElement = nullptr;
- m_directUseElement = 0;
- m_correspondingUseElement = 0;
+ m_directUseElement = nullptr;
+ m_correspondingUseElement = nullptr;
#if !ENABLE(OILPAN)
removeDetachedChildrenInContainer<SVGElementInstance, SVGElementInstance>(*this);
@@ -227,6 +226,8 @@ EventTargetData& SVGElementInstance::ensureEventTargetData()
void SVGElementInstance::trace(Visitor* visitor)
{
visitor->trace(m_parentInstance);
+ visitor->trace(m_correspondingUseElement);
+ visitor->trace(m_directUseElement);
visitor->trace(m_element);
visitor->trace(m_shadowTreeElement);
visitor->trace(m_previousSibling);
« no previous file with comments | « Source/core/svg/SVGElementInstance.h ('k') | Source/core/svg/SVGElementRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698