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

Unified Diff: Source/core/dom/shadow/ShadowRoot.cpp

Issue 235113002: Oilpan: Remove guardRef and guardDeref from TreeScope. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Only perform weak processing of the event handler registry if the document is active. Created 6 years, 8 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/dom/shadow/ShadowRoot.cpp
diff --git a/Source/core/dom/shadow/ShadowRoot.cpp b/Source/core/dom/shadow/ShadowRoot.cpp
index e7dcc984865024fc57d1a6ff573ea073cf93abaa..990c5891bd376adc344d9773ea0a3ee2dc3d5caa 100644
--- a/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/Source/core/dom/shadow/ShadowRoot.cpp
@@ -68,10 +68,12 @@ ShadowRoot::~ShadowRoot()
ASSERT(!m_prev);
ASSERT(!m_next);
+#if !ENABLE(OILPAN)
if (m_shadowRootRareData && m_shadowRootRareData->styleSheets())
m_shadowRootRareData->styleSheets()->detachFromDocument();
document().styleEngine()->didRemoveShadowRoot(this);
haraken 2014/04/25 14:30:32 I wonder why these lines are not written in Shadow
Mads Ager (chromium) 2014/04/28 09:45:21 No, we shouldn't have this in removedFrom. We shou
+#endif
// We cannot let ContainerNode destructor call willBeDeletedFromDocument()
// for this ShadowRoot instance because TreeScope destructor
@@ -230,7 +232,7 @@ ShadowRootRareData* ShadowRoot::ensureShadowRootRareData()
if (m_shadowRootRareData)
return m_shadowRootRareData.get();
- m_shadowRootRareData = adoptPtr(new ShadowRootRareData);
+ m_shadowRootRareData = adoptPtrWillBeNoop(new ShadowRootRareData);
return m_shadowRootRareData.get();
}
@@ -333,4 +335,11 @@ StyleSheetList* ShadowRoot::styleSheets()
return m_shadowRootRareData->styleSheets();
}
+void ShadowRoot::trace(Visitor* visitor)
+{
+ visitor->trace(m_shadowRootRareData);
+ TreeScope::trace(visitor);
+ DocumentFragment::trace(visitor);
+}
+
}

Powered by Google App Engine
This is Rietveld 408576698