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

Side by Side Diff: third_party/WebKit/Source/modules/encryptedmedia/MediaKeySession.cpp

Issue 2629593004: Disambiguate LifecycleObserver::contextDestroyed (Closed)
Patch Set: temp Created 3 years, 11 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2013 Apple Inc. All rights reserved. 2 * Copyright (C) 2013 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 1012 matching lines...) Expand 10 before | Expand all | Expand 10 after
1023 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "") 1023 << (!m_pendingActions.isEmpty() ? " !m_pendingActions.isEmpty()" : "")
1024 << (m_asyncEventQueue->hasPendingEvents() 1024 << (m_asyncEventQueue->hasPendingEvents()
1025 ? " m_asyncEventQueue->hasPendingEvents()" 1025 ? " m_asyncEventQueue->hasPendingEvents()"
1026 : "") 1026 : "")
1027 << ((m_mediaKeys && !m_isClosed) ? " m_mediaKeys && !m_isClosed" : ""); 1027 << ((m_mediaKeys && !m_isClosed) ? " m_mediaKeys && !m_isClosed" : "");
1028 1028
1029 return !m_pendingActions.isEmpty() || m_asyncEventQueue->hasPendingEvents() || 1029 return !m_pendingActions.isEmpty() || m_asyncEventQueue->hasPendingEvents() ||
1030 (m_mediaKeys && !m_isClosed); 1030 (m_mediaKeys && !m_isClosed);
1031 } 1031 }
1032 1032
1033 void MediaKeySession::contextDestroyed() { 1033 void MediaKeySession::contextDestroyed(ExecutionContext*) {
1034 // Stop the CDM from firing any more events for this session. 1034 // Stop the CDM from firing any more events for this session.
1035 m_session.reset(); 1035 m_session.reset();
1036 m_isClosed = true; 1036 m_isClosed = true;
1037 m_actionTimer.stop(); 1037 m_actionTimer.stop();
1038 m_pendingActions.clear(); 1038 m_pendingActions.clear();
1039 m_asyncEventQueue->close(); 1039 m_asyncEventQueue->close();
1040 } 1040 }
1041 1041
1042 DEFINE_TRACE(MediaKeySession) { 1042 DEFINE_TRACE(MediaKeySession) {
1043 visitor->trace(m_asyncEventQueue); 1043 visitor->trace(m_asyncEventQueue);
1044 visitor->trace(m_pendingActions); 1044 visitor->trace(m_pendingActions);
1045 visitor->trace(m_mediaKeys); 1045 visitor->trace(m_mediaKeys);
1046 visitor->trace(m_keyStatusesMap); 1046 visitor->trace(m_keyStatusesMap);
1047 visitor->trace(m_closedPromise); 1047 visitor->trace(m_closedPromise);
1048 EventTargetWithInlineData::trace(visitor); 1048 EventTargetWithInlineData::trace(visitor);
1049 ContextLifecycleObserver::trace(visitor); 1049 ContextLifecycleObserver::trace(visitor);
1050 } 1050 }
1051 1051
1052 } // namespace blink 1052 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698