Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1026 << (m_asyncEventQueue->hasPendingEvents() | 1026 << (m_asyncEventQueue->hasPendingEvents() |
| 1027 ? " m_asyncEventQueue->hasPendingEvents()" | 1027 ? " m_asyncEventQueue->hasPendingEvents()" |
| 1028 : "") | 1028 : "") |
| 1029 << ((m_mediaKeys && !m_isClosed) ? " m_mediaKeys && !m_isClosed" : ""); | 1029 << ((m_mediaKeys && !m_isClosed) ? " m_mediaKeys && !m_isClosed" : ""); |
| 1030 | 1030 |
| 1031 return !m_pendingActions.isEmpty() || m_asyncEventQueue->hasPendingEvents() || | 1031 return !m_pendingActions.isEmpty() || m_asyncEventQueue->hasPendingEvents() || |
| 1032 (m_mediaKeys && !m_isClosed); | 1032 (m_mediaKeys && !m_isClosed); |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 void MediaKeySession::contextDestroyed() { | 1035 void MediaKeySession::contextDestroyed() { |
| 1036 DVLOG(MEDIA_KEY_SESSION_LOG_LEVEL) << __func__ << "(" << this << ")"; | |
| 1037 | |
| 1038 // If call contextDestroyed before close session, clear session without | |
| 1039 // closeTask. | |
| 1040 // So call actionTimerFired(0) if there is a delayed pendingAction. | |
| 1041 if (!m_pendingActions.isEmpty()) | |
| 1042 actionTimerFired(0); | |
|
haraken
2016/11/01 06:28:25
If there is a pending task with PendingAction::Gen
Dongheun Kang
2016/11/01 06:54:44
No. I'd better rollback to a previous patch.
| |
| 1043 | |
| 1036 // Stop the CDM from firing any more events for this session. | 1044 // Stop the CDM from firing any more events for this session. |
| 1037 m_session.reset(); | 1045 m_session.reset(); |
| 1038 m_isClosed = true; | 1046 m_isClosed = true; |
| 1039 m_actionTimer.stop(); | 1047 m_actionTimer.stop(); |
| 1040 m_pendingActions.clear(); | 1048 m_pendingActions.clear(); |
| 1041 m_asyncEventQueue->close(); | 1049 m_asyncEventQueue->close(); |
| 1042 } | 1050 } |
| 1043 | 1051 |
| 1044 DEFINE_TRACE(MediaKeySession) { | 1052 DEFINE_TRACE(MediaKeySession) { |
| 1045 visitor->trace(m_asyncEventQueue); | 1053 visitor->trace(m_asyncEventQueue); |
| 1046 visitor->trace(m_pendingActions); | 1054 visitor->trace(m_pendingActions); |
| 1047 visitor->trace(m_mediaKeys); | 1055 visitor->trace(m_mediaKeys); |
| 1048 visitor->trace(m_keyStatusesMap); | 1056 visitor->trace(m_keyStatusesMap); |
| 1049 visitor->trace(m_closedPromise); | 1057 visitor->trace(m_closedPromise); |
| 1050 EventTargetWithInlineData::trace(visitor); | 1058 EventTargetWithInlineData::trace(visitor); |
| 1051 ActiveDOMObject::trace(visitor); | 1059 ActiveDOMObject::trace(visitor); |
| 1052 } | 1060 } |
| 1053 | 1061 |
| 1054 } // namespace blink | 1062 } // namespace blink |
| OLD | NEW |