| Index: Source/core/css/StyleSheetList.cpp
|
| diff --git a/Source/core/css/StyleSheetList.cpp b/Source/core/css/StyleSheetList.cpp
|
| index 4581cb1d07048c0ca0f1cd2cf451dff464ef441f..03b23c2327baa4f6417e1643af1abfba1129521b 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()
|
| {
|
| @@ -94,7 +93,7 @@ CSSStyleSheet* StyleSheetList::anonymousNamedGetter(const AtomicString& name)
|
|
|
| void StyleSheetList::trace(Visitor* visitor)
|
| {
|
| - visitor->trace(m_detachedStyleSheets);
|
| + visitor->trace(m_treeScope);
|
| }
|
|
|
| } // namespace WebCore
|
|
|