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

Unified Diff: third_party/WebKit/Source/core/inspector/InspectorStyleSheet.h

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/InspectorStyleSheet.h
diff --git a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.h b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.h
index 761e85ab9c3078f26d137e29d263596943669e9a..26d56ac691ea9166245077fdc00d662f93a6b46e 100644
--- a/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.h
+++ b/third_party/WebKit/Source/core/inspector/InspectorStyleSheet.h
@@ -53,9 +53,10 @@ class InspectorStyleSheetBase;
typedef HeapVector<Member<CSSRule>> CSSRuleVector;
typedef Vector<unsigned> LineEndings;
-class InspectorStyle final : public GarbageCollected<InspectorStyle> {
+class InspectorStyle final : public GarbageCollectedFinalized<InspectorStyle> {
public:
- static InspectorStyle* create(CSSStyleDeclaration*, CSSRuleSourceData*, InspectorStyleSheetBase* parentStyleSheet);
+ static InspectorStyle* create(CSSStyleDeclaration*, PassRefPtr<CSSRuleSourceData>, InspectorStyleSheetBase* parentStyleSheet);
+ ~InspectorStyle();
CSSStyleDeclaration* cssStyle() { return m_style.get(); }
std::unique_ptr<protocol::CSS::CSSStyle> buildObjectForStyle();
@@ -66,14 +67,14 @@ public:
DECLARE_TRACE();
private:
- InspectorStyle(CSSStyleDeclaration*, CSSRuleSourceData*, InspectorStyleSheetBase* parentStyleSheet);
+ InspectorStyle(CSSStyleDeclaration*, PassRefPtr<CSSRuleSourceData>, InspectorStyleSheetBase* parentStyleSheet);
- void populateAllProperties(HeapVector<CSSPropertySourceData>& result);
+ void populateAllProperties(Vector<CSSPropertySourceData>& result);
std::unique_ptr<protocol::CSS::CSSStyle> styleWithProperties();
String shorthandValue(const String& shorthandProperty);
Member<CSSStyleDeclaration> m_style;
- Member<CSSRuleSourceData> m_sourceData;
+ RefPtr<CSSRuleSourceData> m_sourceData;
Member<InspectorStyleSheetBase> m_parentStyleSheet;
};
@@ -181,7 +182,7 @@ private:
Member<CSSStyleSheet> m_pageStyleSheet;
String m_origin;
String m_documentURL;
- Member<RuleSourceDataList> m_sourceData;
+ std::unique_ptr<RuleSourceDataList> m_sourceData;
String m_text;
CSSRuleVector m_cssomFlatRules;
CSSRuleVector m_parsedFlatRules;
@@ -199,7 +200,7 @@ public:
bool setText(const String&, ExceptionState&) override;
bool getText(String* result) override;
CSSStyleDeclaration* inlineStyle();
- CSSRuleSourceData* ruleSourceData();
+ PassRefPtr<CSSRuleSourceData> ruleSourceData();
DECLARE_VIRTUAL_TRACE();

Powered by Google App Engine
This is Rietveld 408576698