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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp

Issue 2060433002: Move SourceRange and CSSPropertySourceData classes off-heap. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix untidy ref-ptr handling Created 4 years, 6 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: third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
diff --git a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
index 29afdacf531ee25ebe6c56ed38ae223ad3d7f6ea..48dc9067ae315ac65e39a974d937e036667db520 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
+++ b/third_party/WebKit/Source/core/inspector/InspectorCSSAgent.cpp
@@ -1890,7 +1890,7 @@ CSSStyleDeclaration* InspectorCSSAgent::findEffectiveDeclaration(CSSPropertyID p
void InspectorCSSAgent::setLayoutEditorValue(ErrorString* errorString, Element* element, CSSStyleDeclaration* style, CSSPropertyID propertyId, const String& value, bool forceImportant)
{
InspectorStyleSheetBase* inspectorStyleSheet = nullptr;
- CSSRuleSourceData* sourceData = nullptr;
+ RefPtr<CSSRuleSourceData> sourceData;
// An absence of the parent rule means that given style is an inline style.
if (style->parentRule()) {
InspectorStyleSheet* styleSheet = bindStyleSheet(style->parentStyleSheet());
@@ -1914,7 +1914,7 @@ void InspectorCSSAgent::setLayoutEditorValue(ErrorString* errorString, Element*
String longhand = getPropertyNameString(propertyId);
int foundIndex = -1;
- HeapVector<CSSPropertySourceData> properties = sourceData->styleSourceData->propertyData;
+ Vector<CSSPropertySourceData> properties = sourceData->styleSourceData->propertyData;
for (unsigned i = 0; i < properties.size(); ++i) {
CSSPropertySourceData property = properties[properties.size() - i - 1];
String name = property.name;
@@ -1964,7 +1964,7 @@ void InspectorCSSAgent::setLayoutEditorValue(ErrorString* errorString, Element*
void InspectorCSSAgent::layoutEditorItemSelected(Element* element, CSSStyleDeclaration* style)
{
InspectorStyleSheetBase* inspectorStyleSheet = nullptr;
- CSSRuleSourceData* sourceData = nullptr;
+ RefPtr<CSSRuleSourceData> sourceData;
if (style->parentRule()) {
InspectorStyleSheet* styleSheet = bindStyleSheet(style->parentStyleSheet());
inspectorStyleSheet = styleSheet;

Powered by Google App Engine
This is Rietveld 408576698