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

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

Issue 1555993002: Reduce risk of MediaQueryEvaluator-induced leaks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 | « no previous file | third_party/WebKit/Source/core/css/MediaQueryEvaluator.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/MediaQueryEvaluator.h
diff --git a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.h b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.h
index 93fc15763f99ee8778d7c858010ff3a2ed8bbd2e..5ce10de4ad53f1fd536e1954deff5a287be903d7 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryEvaluator.h
+++ b/third_party/WebKit/Source/core/css/MediaQueryEvaluator.h
@@ -53,8 +53,9 @@ using MediaQueryResultList = WillBeHeapVector<RefPtrWillBeMember<MediaQueryResul
// the device characteristics are not known. This can be used to prune the loading
// of stylesheets to only those which are probable to match.
-class CORE_EXPORT MediaQueryEvaluator {
- WTF_MAKE_NONCOPYABLE(MediaQueryEvaluator); USING_FAST_MALLOC(MediaQueryEvaluator);
+class CORE_EXPORT MediaQueryEvaluator final : public NoBaseWillBeGarbageCollectedFinalized<MediaQueryEvaluator> {
+ WTF_MAKE_NONCOPYABLE(MediaQueryEvaluator);
+ USING_FAST_MALLOC_WILL_BE_REMOVED(MediaQueryEvaluator);
public:
// Creates evaluator which evaluates only simple media queries
// Evaluator returns true for "all", and returns value of \mediaFeatureResult
@@ -87,12 +88,14 @@ public:
// Evaluates media query subexpression, ie "and (media-feature: value)" part.
bool eval(const MediaQueryExp*) const;
+ DECLARE_TRACE();
+
private:
const String mediaType() const;
String m_mediaType;
bool m_expectedResult;
- RefPtrWillBePersistent<MediaValues> m_mediaValues;
+ RefPtrWillBeMember<MediaValues> m_mediaValues;
};
} // namespace
« no previous file with comments | « no previous file | third_party/WebKit/Source/core/css/MediaQueryEvaluator.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698