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

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
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..e0a179a414bc237e9721b01ad5ac8b963b269259 100644
--- a/third_party/WebKit/Source/core/css/MediaQuery.h
+++ b/third_party/WebKit/Source/core/css/MediaQuery.h
@@ -39,16 +39,16 @@
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();
@@ -58,9 +58,9 @@ 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::WrapUnique(new MediaQuery(*this));
+ }
private:
MediaQuery(RestrictorType, String media_type, ExpressionHeapVector);

Powered by Google App Engine
This is Rietveld 408576698