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

Unified Diff: third_party/WebKit/Source/core/css/MediaQuery.h

Issue 2873433003: Move MediaQuery classes off BlinkGC heap (Closed)
Patch Set: Created 3 years, 7 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 | « third_party/WebKit/Source/core/css/MediaList.cpp ('k') | third_party/WebKit/Source/core/css/MediaQuery.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/css/MediaQuery.h
diff --git a/third_party/WebKit/Source/core/css/MediaQuery.h b/third_party/WebKit/Source/core/css/MediaQuery.h
index 956f5c1614e5761989ca9d4edd6265b65d6b28b9..4d4a7bbc90abb6238b9a61353ab9054f9f365d7c 100644
--- a/third_party/WebKit/Source/core/css/MediaQuery.h
+++ b/third_party/WebKit/Source/core/css/MediaQuery.h
@@ -39,17 +39,19 @@
namespace blink {
class MediaQueryExp;
-using ExpressionHeapVector = HeapVector<Member<MediaQueryExp>>;
+using ExpressionHeapVector = Vector<MediaQueryExp>;
-class CORE_EXPORT MediaQuery : public GarbageCollectedFinalized<MediaQuery> {
+class CORE_EXPORT MediaQuery {
public:
enum RestrictorType { Only, Not, None };
- static MediaQuery* create(RestrictorType,
- String mediaType,
- ExpressionHeapVector);
- static MediaQuery* createNotAll();
+ static std::unique_ptr<MediaQuery> create(RestrictorType,
+ String mediaType,
+ ExpressionHeapVector);
+ static std::unique_ptr<MediaQuery> createNotAll();
+ MediaQuery(RestrictorType, String media_type, ExpressionHeapVector);
+ MediaQuery(const MediaQuery&);
~MediaQuery();
RestrictorType restrictor() const { return m_restrictor; }
@@ -58,14 +60,13 @@ class CORE_EXPORT MediaQuery : public GarbageCollectedFinalized<MediaQuery> {
bool operator==(const MediaQuery& other) const;
String cssText() const;
- MediaQuery* copy() const { return new MediaQuery(*this); }
+ std::unique_ptr<MediaQuery> copy() const {
+ return WTF::makeUnique<MediaQuery>(*this);
+ }
DECLARE_TRACE();
private:
- MediaQuery(RestrictorType, String mediaType, ExpressionHeapVector);
- MediaQuery(const MediaQuery&);
-
MediaQuery& operator=(const MediaQuery&) = delete;
RestrictorType m_restrictor;
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaList.cpp ('k') | third_party/WebKit/Source/core/css/MediaQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698