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

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: Address comments. 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
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.h ('k') | Source/core/dom/shadow/ShadowRootRareData.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..896f38f731ff3cf87956e1545280f2657ba855fa 100644
--- a/Source/core/dom/shadow/ShadowRoot.cpp
+++ b/Source/core/dom/shadow/ShadowRoot.cpp
@@ -68,16 +68,20 @@ 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);
+#endif
+#if !ENABLE(OILPAN)
// We cannot let ContainerNode destructor call willBeDeletedFromDocument()
// for this ShadowRoot instance because TreeScope destructor
// clears Node::m_treeScope thus ContainerNode is no longer able
// to access it Document reference after that.
willBeDeletedFromDocument();
+#endif
// We must remove all of our children first before the TreeScope destructor
// runs so we don't go through TreeScopeAdopter for each child with a
@@ -230,7 +234,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 +337,11 @@ StyleSheetList* ShadowRoot::styleSheets()
return m_shadowRootRareData->styleSheets();
}
+void ShadowRoot::trace(Visitor* visitor)
+{
+ visitor->trace(m_shadowRootRareData);
+ TreeScope::trace(visitor);
+ DocumentFragment::trace(visitor);
+}
+
}
« no previous file with comments | « Source/core/dom/shadow/ShadowRoot.h ('k') | Source/core/dom/shadow/ShadowRootRareData.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698