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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 , m_actionTimer(this, &MediaKeySession::actionTimerFired) | 77 , m_actionTimer(this, &MediaKeySession::actionTimerFired) |
78 { | 78 { |
79 WTF_LOG(Media, "MediaKeySession::MediaKeySession"); | 79 WTF_LOG(Media, "MediaKeySession::MediaKeySession"); |
80 ScriptWrappable::init(this); | 80 ScriptWrappable::init(this); |
81 ASSERT(m_session); | 81 ASSERT(m_session); |
82 } | 82 } |
83 | 83 |
84 MediaKeySession::~MediaKeySession() | 84 MediaKeySession::~MediaKeySession() |
85 { | 85 { |
86 m_session.clear(); | 86 m_session.clear(); |
| 87 #if !ENABLE(OILPAN) |
| 88 // MediaKeySession and m_asyncEventQueue always become unreachable |
| 89 // together. So MediaKeySession and m_asyncEventQueue are destructed in the |
| 90 // same GC. We don't need to call cancelAllEvents explicitly in Oilpan. |
87 m_asyncEventQueue->cancelAllEvents(); | 91 m_asyncEventQueue->cancelAllEvents(); |
| 92 #endif |
88 } | 93 } |
89 | 94 |
90 void MediaKeySession::setError(MediaKeyError* error) | 95 void MediaKeySession::setError(MediaKeyError* error) |
91 { | 96 { |
92 m_error = error; | 97 m_error = error; |
93 } | 98 } |
94 | 99 |
95 String MediaKeySession::sessionId() const | 100 String MediaKeySession::sessionId() const |
96 { | 101 { |
97 return m_session->sessionId(); | 102 return m_session->sessionId(); |
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
265 m_isClosed = true; | 270 m_isClosed = true; |
266 | 271 |
267 if (m_actionTimer.isActive()) | 272 if (m_actionTimer.isActive()) |
268 m_actionTimer.stop(); | 273 m_actionTimer.stop(); |
269 m_pendingActions.clear(); | 274 m_pendingActions.clear(); |
270 m_asyncEventQueue->close(); | 275 m_asyncEventQueue->close(); |
271 } | 276 } |
272 | 277 |
273 void MediaKeySession::trace(Visitor* visitor) | 278 void MediaKeySession::trace(Visitor* visitor) |
274 { | 279 { |
| 280 visitor->trace(m_asyncEventQueue); |
275 visitor->trace(m_keys); | 281 visitor->trace(m_keys); |
276 EventTargetWithInlineData::trace(visitor); | 282 EventTargetWithInlineData::trace(visitor); |
277 } | 283 } |
278 | 284 |
279 } | 285 } |
OLD | NEW |