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

Unified Diff: third_party/WebKit/Source/core/css/MediaQueryMatcher.cpp

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
Index: third_party/WebKit/Source/core/css/MediaQueryMatcher.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaQueryMatcher.cpp b/third_party/WebKit/Source/core/css/MediaQueryMatcher.cpp
index 7579d1f0c1e4dd50c8675b03800ab1d5752aeb04..16479c1d6458fc46d63f0901d24f08a57f694b5c 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryMatcher.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryMatcher.cpp
@@ -53,12 +53,12 @@ void MediaQueryMatcher::documentDetached()
m_evaluator = nullptr;
}
-PassOwnPtr<MediaQueryEvaluator> MediaQueryMatcher::createEvaluator() const
+PassOwnPtrWillBeRawPtr<MediaQueryEvaluator> MediaQueryMatcher::createEvaluator() const
{
if (!m_document || !m_document->frame())
return nullptr;
- return adoptPtr(new MediaQueryEvaluator(m_document->frame()));
+ return adoptPtrWillBeNoop(new MediaQueryEvaluator(m_document->frame()));
}
bool MediaQueryMatcher::evaluate(const MediaQuerySet* media)
@@ -147,6 +147,7 @@ DEFINE_TRACE(MediaQueryMatcher)
{
#if ENABLE(OILPAN)
visitor->trace(m_document);
+ visitor->trace(m_evaluator);
visitor->trace(m_mediaLists);
visitor->trace(m_viewportListeners);
#endif
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryMatcher.h ('k') | third_party/WebKit/Source/core/css/resolver/StyleResolver.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698