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

Unified Diff: Source/core/css/MediaQueryExp.cpp

Issue 170283019: Change various helper classes to transition types to get CSSValue entirely onto the gc heap. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 10 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: Source/core/css/MediaQueryExp.cpp
diff --git a/Source/core/css/MediaQueryExp.cpp b/Source/core/css/MediaQueryExp.cpp
index 5e8880737768870b08c966f9417a70ecc7974363..dddbb466905a812d44557fcc644dcb0b2ff97386 100644
--- a/Source/core/css/MediaQueryExp.cpp
+++ b/Source/core/css/MediaQueryExp.cpp
@@ -38,6 +38,8 @@
namespace WebCore {
+DEFINE_GC_INFO(MediaQueryExp);
+
static inline bool featureWithCSSValueID(const AtomicString& mediaFeature, const CSSParserValue* value)
{
if (!value->id)
@@ -195,13 +197,19 @@ bool MediaQueryExp::isViewportDependent() const
|| m_mediaFeature == MediaFeatureNames::maxAspectRatioMediaFeature;
}
+MediaQueryExp::MediaQueryExp(const MediaQueryExp& other)
haraken 2014/02/21 01:02:36 I'm just curious: Why do you need to add the copy
wibling-chromium 2014/02/21 08:43:08 Because of the copy method in the .h file. It call
+ : m_mediaFeature(other.mediaFeature())
+ , m_value(other.value())
+{
+}
+
MediaQueryExp::MediaQueryExp(const AtomicString& mediaFeature, PassRefPtrWillBeRawPtr<CSSValue> value)
: m_mediaFeature(mediaFeature)
, m_value(value)
{
}
-PassOwnPtr<MediaQueryExp> MediaQueryExp::create(const AtomicString& mediaFeature, CSSParserValueList* valueList)
+PassOwnPtrWillBeRawPtr<MediaQueryExp> MediaQueryExp::create(const AtomicString& mediaFeature, CSSParserValueList* valueList)
{
RefPtrWillBeRawPtr<CSSValue> cssValue;
bool isValid = false;
@@ -268,7 +276,7 @@ PassOwnPtr<MediaQueryExp> MediaQueryExp::create(const AtomicString& mediaFeature
if (!isValid)
return nullptr;
- return adoptPtr(new MediaQueryExp(mediaFeature, cssValue));
+ return adoptPtrWillBeNoop(new MediaQueryExp(mediaFeature, cssValue));
}
MediaQueryExp::~MediaQueryExp()

Powered by Google App Engine
This is Rietveld 408576698