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

Unified Diff: Source/core/css/StyleSheetList.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/css/StyleSheetList.h ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StyleSheetList.cpp
diff --git a/Source/core/css/StyleSheetList.cpp b/Source/core/css/StyleSheetList.cpp
index 4581cb1d07048c0ca0f1cd2cf451dff464ef441f..6afb2cfb733c5cd2a3a8ba5facd18562af65d5ab 100644
--- a/Source/core/css/StyleSheetList.cpp
+++ b/Source/core/css/StyleSheetList.cpp
@@ -42,21 +42,20 @@ StyleSheetList::~StyleSheetList()
inline const WillBeHeapVector<RefPtrWillBeMember<StyleSheet> >& StyleSheetList::styleSheets()
{
+#if !ENABLE(OILPAN)
if (!m_treeScope)
return m_detachedStyleSheets;
+#endif
return document()->styleEngine()->styleSheetsForStyleSheetList(*m_treeScope);
}
+#if !ENABLE(OILPAN)
void StyleSheetList::detachFromDocument()
{
- // FIXME: Oilpan: This is safe currently because the Document is
- // *not* in the oilpan heap and the style engine is alive when the
- // document dies. When the Document is in the oilpan heap, we need
- // the StyleSheetList and the document to die together and get rid
- // of the detachedStyleSheets.
m_detachedStyleSheets = document()->styleEngine()->styleSheetsForStyleSheetList(*m_treeScope);
- m_treeScope = 0;
+ m_treeScope = nullptr;
}
+#endif
unsigned StyleSheetList::length()
{
@@ -71,8 +70,10 @@ StyleSheet* StyleSheetList::item(unsigned index)
HTMLStyleElement* StyleSheetList::getNamedItem(const AtomicString& name) const
{
+#if !ENABLE(OILPAN)
if (!m_treeScope)
return 0;
+#endif
// IE also supports retrieving a stylesheet by name, using the name/id of the <style> tag
// (this is consistent with all the other collections)
@@ -94,7 +95,7 @@ CSSStyleSheet* StyleSheetList::anonymousNamedGetter(const AtomicString& name)
void StyleSheetList::trace(Visitor* visitor)
{
- visitor->trace(m_detachedStyleSheets);
+ visitor->trace(m_treeScope);
}
} // namespace WebCore
« no previous file with comments | « Source/core/css/StyleSheetList.h ('k') | Source/core/dom/ContainerNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698