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

Unified Diff: Source/core/css/CSSImportRule.cpp

Issue 170283019: Change various helper classes to transition types to get CSSValue entirely onto the gc heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase and revert member to persistent in StorageEvent Created 6 years, 10 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/css/CSSImportRule.cpp
diff --git a/Source/core/css/CSSImportRule.cpp b/Source/core/css/CSSImportRule.cpp
index c7766845fcfd416f312e5fe058163833c2a453d4..a552f7b9560a87ea6a8dc330c7c0c5684ffae14b 100644
--- a/Source/core/css/CSSImportRule.cpp
+++ b/Source/core/css/CSSImportRule.cpp
@@ -40,8 +40,13 @@ CSSImportRule::~CSSImportRule()
{
if (m_styleSheetCSSOMWrapper)
m_styleSheetCSSOMWrapper->clearOwnerRule();
+#if !ENABLE(OILPAN)
+ // MediaList and the parent CSSImportRule are both on the oilpan heap and die together.
+ // Therefor clearing is not needed nor allowed since it could be touching already
+ // finalized memory.
if (m_mediaCSSOMWrapper)
m_mediaCSSOMWrapper->clearParentRule();
+#endif // ENABLE(OILPAN)
}
String CSSImportRule::href() const
@@ -94,6 +99,7 @@ void CSSImportRule::reattach(StyleRuleBase*)
void CSSImportRule::trace(Visitor* visitor)
{
visitor->trace(m_importRule);
+ visitor->trace(m_mediaCSSOMWrapper);
CSSRule::trace(visitor);
}

Powered by Google App Engine
This is Rietveld 408576698