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

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

Issue 1750453002: Reduce ActiveDOMObjects from core/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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: third_party/WebKit/Source/core/css/MediaQueryList.cpp
diff --git a/third_party/WebKit/Source/core/css/MediaQueryList.cpp b/third_party/WebKit/Source/core/css/MediaQueryList.cpp
index 525a5a6fa2ef56b69d939ff4b01816ad8f5c7fe4..74e0b779b4b71f6f5cf73a1c490a95b479426096 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryList.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryList.cpp
@@ -29,13 +29,11 @@ namespace blink {
PassRefPtrWillBeRawPtr<MediaQueryList> MediaQueryList::create(ExecutionContext* context, PassRefPtrWillBeRawPtr<MediaQueryMatcher> matcher, PassRefPtrWillBeRawPtr<MediaQuerySet> media)
{
- RefPtrWillBeRawPtr<MediaQueryList> list = adoptRefWillBeNoop(new MediaQueryList(context, matcher, media));
- list->suspendIfNeeded();
- return list.release();
+ return adoptRefWillBeNoop(new MediaQueryList(context, matcher, media));
}
MediaQueryList::MediaQueryList(ExecutionContext* context, PassRefPtrWillBeRawPtr<MediaQueryMatcher> matcher, PassRefPtrWillBeRawPtr<MediaQuerySet> media)
- : ActiveDOMObject(context)
+ : ContextLifecycleObserver(context)
, m_matcher(matcher)
, m_media(media)
, m_matchesDirty(true)
@@ -95,7 +93,7 @@ bool MediaQueryList::hasPendingActivity() const
return m_listeners.size() || hasEventListeners(EventTypeNames::change);
}
-void MediaQueryList::stop()
+void MediaQueryList::contextDestroyed()
{
// m_listeners.clear() can drop the last ref to this MediaQueryList.
RefPtrWillBeRawPtr<MediaQueryList> protect(this);
@@ -138,7 +136,7 @@ DEFINE_TRACE(MediaQueryList)
visitor->trace(m_listeners);
#endif
EventTargetWithInlineData::trace(visitor);
- ActiveDOMObject::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
}
const AtomicString& MediaQueryList::interfaceName() const
@@ -148,7 +146,7 @@ const AtomicString& MediaQueryList::interfaceName() const
ExecutionContext* MediaQueryList::executionContext() const
{
- return ActiveDOMObject::executionContext();
+ return ContextLifecycleObserver::executionContext();
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698