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

Unified Diff: Source/core/inspector/InspectorStyleSheet.cpp

Issue 192473003: Move CSSRuleList to the garbage collected heap (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: ager feedback Created 6 years, 9 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/inspector/InspectorStyleSheet.h ('k') | Source/core/storage/StorageEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/inspector/InspectorStyleSheet.cpp
diff --git a/Source/core/inspector/InspectorStyleSheet.cpp b/Source/core/inspector/InspectorStyleSheet.cpp
index 8bcbe9da32d59a0bfba160c2b742e5cfa2f83538..d995701883b733b3d58b43717844429c16e3f358 100644
--- a/Source/core/inspector/InspectorStyleSheet.cpp
+++ b/Source/core/inspector/InspectorStyleSheet.cpp
@@ -471,13 +471,13 @@ static PassRefPtr<TypeBuilder::CSS::SourceRange> buildSourceRangeObject(const So
return result.release();
}
-static PassRefPtr<CSSRuleList> asCSSRuleList(CSSStyleSheet* styleSheet)
+static PassRefPtrWillBeRawPtr<CSSRuleList> asCSSRuleList(CSSStyleSheet* styleSheet)
{
if (!styleSheet)
return nullptr;
- RefPtr<StaticCSSRuleList> list = StaticCSSRuleList::create();
- WillBePersistentHeapVector<RefPtrWillBeMember<CSSRule> >& listRules = list->rules();
+ RefPtrWillBeRawPtr<StaticCSSRuleList> list = StaticCSSRuleList::create();
+ WillBeHeapVector<RefPtrWillBeMember<CSSRule> >& listRules = list->rules();
for (unsigned i = 0, size = styleSheet->length(); i < size; ++i) {
CSSRule* item = styleSheet->item(i);
if (item->type() == CSSRule::CHARSET_RULE)
@@ -487,7 +487,7 @@ static PassRefPtr<CSSRuleList> asCSSRuleList(CSSStyleSheet* styleSheet)
return list.release();
}
-static PassRefPtr<CSSRuleList> asCSSRuleList(CSSRule* rule)
+static PassRefPtrWillBeRawPtr<CSSRuleList> asCSSRuleList(CSSRule* rule)
{
if (!rule)
return nullptr;
@@ -847,7 +847,7 @@ String InspectorStyleSheet::styleSheetURL(CSSStyleSheet* pageStyleSheet)
}
// static
-void InspectorStyleSheet::collectFlatRules(PassRefPtr<CSSRuleList> ruleList, CSSRuleVector* result)
+void InspectorStyleSheet::collectFlatRules(PassRefPtrWillBeRawPtr<CSSRuleList> ruleList, CSSRuleVector* result)
{
if (!ruleList)
return;
@@ -867,7 +867,7 @@ void InspectorStyleSheet::collectFlatRules(PassRefPtr<CSSRuleList> ruleList, CSS
default:
break;
}
- RefPtr<CSSRuleList> childRuleList = asCSSRuleList(rule);
+ RefPtrWillBeRawPtr<CSSRuleList> childRuleList = asCSSRuleList(rule);
if (childRuleList)
collectFlatRules(childRuleList, result);
}
« no previous file with comments | « Source/core/inspector/InspectorStyleSheet.h ('k') | Source/core/storage/StorageEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698