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

Unified Diff: Source/core/dom/StyleEngine.cpp

Issue 262093006: Oilpan: Make the Node hierarchy RefCountedGarbageCollected instead of TreeShared. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Address more comments. 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
Index: Source/core/dom/StyleEngine.cpp
diff --git a/Source/core/dom/StyleEngine.cpp b/Source/core/dom/StyleEngine.cpp
index 0ba45539df989ad6ed7c39af7de8de08a9ed8e75..5048296531254421fd45ad136a20ea558870ff88 100644
--- a/Source/core/dom/StyleEngine.cpp
+++ b/Source/core/dom/StyleEngine.cpp
@@ -78,24 +78,21 @@ StyleEngine::~StyleEngine()
{
}
+#if !ENABLE(OILPAN)
void StyleEngine::detachFromDocument()
{
// Cleanup is performed eagerly when the StyleEngine is removed from the
// document. The StyleEngine is unreachable after this, since only the
// document has a reference to it.
-#if !ENABLE(OILPAN)
for (unsigned i = 0; i < m_injectedAuthorStyleSheets.size(); ++i)
m_injectedAuthorStyleSheets[i]->clearOwnerNode();
for (unsigned i = 0; i < m_authorStyleSheets.size(); ++i)
m_authorStyleSheets[i]->clearOwnerNode();
-#endif
if (m_fontSelector) {
m_fontSelector->clearDocument();
Mads Ager (chromium) 2014/05/05 13:06:40 Erik points out that removing this is probably uns
haraken 2014/05/06 04:20:16 Yeah, this looks unsafe. Want to look at the chang
Erik Corry 2014/05/06 08:29:40 As discussed offline this is still needed somehow.
-#if !ENABLE(OILPAN)
if (m_resolver)
m_fontSelector->unregisterForInvalidationCallbacks(m_resolver.get());
-#endif
}
// Decrement reference counts for things we could be keeping alive.
@@ -103,6 +100,7 @@ void StyleEngine::detachFromDocument()
m_resolver.clear();
m_styleSheetCollectionMap.clear();
haraken 2014/05/06 04:20:16 Just to confirm: The line 99 - 101 was not needed
Mads Ager (chromium) 2014/05/06 08:26:00 I think that is right. In any case Gustav has a ch
}
+#endif
inline Document* StyleEngine::master()
{

Powered by Google App Engine
This is Rietveld 408576698