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

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

Issue 2837023005: Move MediaQuery classes off BlinkGC heap (Closed)
Patch Set: fix Created 3 years, 8 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 9be5c34c88c3b0a728d4b3049660c8a59d61c260..8223f50109268ca814ab49ac90168ab5bf156da3 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 { kOnly, kNot, kNone };
- static MediaQuery* Create(RestrictorType,
- String media_type,
- ExpressionHeapVector);
- static MediaQuery* CreateNotAll();
+ static std::unique_ptr<MediaQuery> Create(RestrictorType,
+ String media_type,
+ ExpressionHeapVector);
+ static std::unique_ptr<MediaQuery> CreateNotAll();
+ MediaQuery(RestrictorType, String media_type, ExpressionHeapVector);
+ MediaQuery(const MediaQuery&);
~MediaQuery();
RestrictorType Restrictor() const { return restrictor_; }
@@ -58,14 +60,11 @@ class CORE_EXPORT MediaQuery : public GarbageCollectedFinalized<MediaQuery> {
bool operator==(const MediaQuery& other) const;
String CssText() const;
- MediaQuery* Copy() const { return new MediaQuery(*this); }
-
- DECLARE_TRACE();
+ std::unique_ptr<MediaQuery> Copy() const {
+ return WTF::MakeUnique<MediaQuery>(*this);
+ }
private:
- MediaQuery(RestrictorType, String media_type, ExpressionHeapVector);
- MediaQuery(const MediaQuery&);
-
MediaQuery& operator=(const MediaQuery&) = delete;
RestrictorType 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