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

Unified Diff: third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.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/modules/encryptedmedia/MediaKeySession.cpp
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
index 81fe9241a13a6718febd46f3bc889d39ff60b8b8..dc0f0ffa328e12a617ea8d1ac2520b8389165b4b 100644
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp
@@ -355,16 +355,13 @@ MediaKeySession* MediaKeySession::create(
ScriptState* scriptState,
MediaKeys* mediaKeys,
WebEncryptedMediaSessionType sessionType) {
- MediaKeySession* session =
- new MediaKeySession(scriptState, mediaKeys, sessionType);
- session->suspendIfNeeded();
- return session;
+ return new MediaKeySession(scriptState, mediaKeys, sessionType);
}
MediaKeySession::MediaKeySession(ScriptState* scriptState,
MediaKeys* mediaKeys,
WebEncryptedMediaSessionType sessionType)
- : SuspendableObject(scriptState->getExecutionContext()),
+ : ContextLifecycleObserver(scriptState->getExecutionContext()),
m_asyncEventQueue(GenericEventQueue::create(this)),
m_mediaKeys(mediaKeys),
m_sessionType(sessionType),
@@ -1012,7 +1009,7 @@ const AtomicString& MediaKeySession::interfaceName() const {
}
ExecutionContext* MediaKeySession::getExecutionContext() const {
- return SuspendableObject::getExecutionContext();
+ return ContextLifecycleObserver::getExecutionContext();
}
bool MediaKeySession::hasPendingActivity() const {
@@ -1046,7 +1043,7 @@ DEFINE_TRACE(MediaKeySession) {
visitor->trace(m_keyStatusesMap);
visitor->trace(m_closedPromise);
EventTargetWithInlineData::trace(visitor);
- SuspendableObject::trace(visitor);
+ ContextLifecycleObserver::trace(visitor);
}
} // namespace blink

Powered by Google App Engine
This is Rietveld 408576698