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

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

Issue 2583093002: Reduce SuspendableObjects (Closed)
Patch Set: Created 4 years 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 f6744f66a7256c472f2f1275c3508abfcb25130d..a1db575f3a9afaf1007e47e192c6d86e16ea9175 100644
--- a/third_party/WebKit/Source/core/css/MediaQueryList.cpp
+++ b/third_party/WebKit/Source/core/css/MediaQueryList.cpp
@@ -30,15 +30,13 @@ namespace blink {
MediaQueryList* MediaQueryList::create(ExecutionContext* context,
MediaQueryMatcher* matcher,
MediaQuerySet* media) {
- MediaQueryList* list = new MediaQueryList(context, matcher, media);
- list->suspendIfNeeded();
- return list;
+ return new MediaQueryList(context, matcher, media);
}
MediaQueryList::MediaQueryList(ExecutionContext* context,
MediaQueryMatcher* matcher,
MediaQuerySet* media)
- : SuspendableObject(context),
+ : ContextLifecycleObserver(context),
m_matcher(matcher),
m_media(media),
m_matchesDirty(true),
@@ -121,7 +119,7 @@ DEFINE_TRACE(MediaQueryList) {
visitor->trace(m_media);
visitor->trace(m_listeners);
EventTargetWithInlineData::trace(visitor);
- SuspendableObject::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
}
const AtomicString& MediaQueryList::interfaceName() const {
@@ -129,7 +127,7 @@ const AtomicString& MediaQueryList::interfaceName() const {
}
ExecutionContext* MediaQueryList::getExecutionContext() const {
- return SuspendableObject::getExecutionContext();
+ return ContextLifecycleObserver::getExecutionContext();
}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryList.h ('k') | third_party/WebKit/Source/core/dom/ExecutionContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698