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

Unified Diff: third_party/WebKit/Source/core/dom/StyleSheetCollection.h

Issue 2096653004: Avoid stack allocating StyleSheetCollections. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/dom/StyleSheetCollection.h
diff --git a/third_party/WebKit/Source/core/dom/StyleSheetCollection.h b/third_party/WebKit/Source/core/dom/StyleSheetCollection.h
index 47d467d2bd424c6be280c6a0a83452bc001636b4..852af8c7a9daddf082ba85551bb4e9d913294338 100644
--- a/third_party/WebKit/Source/core/dom/StyleSheetCollection.h
+++ b/third_party/WebKit/Source/core/dom/StyleSheetCollection.h
@@ -44,7 +44,10 @@ public:
friend class ActiveDocumentStyleSheetCollector;
friend class ImportedDocumentStyleSheetCollector;
- StyleSheetCollection();
+ static StyleSheetCollection* create()
+ {
+ return new StyleSheetCollection;
+ }
const HeapVector<Member<CSSStyleSheet>>& activeAuthorStyleSheets() const { return m_activeAuthorStyleSheets; }
const HeapVector<Member<StyleSheet>>& styleSheetsForStyleSheetList() const { return m_styleSheetsForStyleSheetList; }
@@ -56,7 +59,11 @@ public:
DECLARE_VIRTUAL_TRACE();
+ void dispose();
+
protected:
+ StyleSheetCollection();
+
HeapVector<Member<StyleSheet>> m_styleSheetsForStyleSheetList;
HeapVector<Member<CSSStyleSheet>> m_activeAuthorStyleSheets;
};

Powered by Google App Engine
This is Rietveld 408576698