Index: third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
diff --git a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
index 54984969c74b7ed16c14ff3634ad58bb78225394..6016aaf05d95cc1d9d8c43b8ed1ea4931877a33c 100644 |
--- a/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
+++ b/third_party/WebKit/Source/modules/encryptedmedia/MediaKeys.cpp |
@@ -277,7 +277,9 @@ DEFINE_TRACE(MediaKeys) { |
} |
void MediaKeys::contextDestroyed() { |
- ActiveDOMObject::contextDestroyed(); |
+ if (m_timer.isActive()) |
+ m_timer.stop(); |
+ m_pendingActions.clear(); |
// We don't need the CDM anymore. Only destroyed after all related |
// ActiveDOMObjects have been stopped. |
@@ -294,12 +296,4 @@ bool MediaKeys::hasPendingActivity() const { |
return !m_pendingActions.isEmpty() || m_reservedForMediaElement; |
} |
-void MediaKeys::stop() { |
- ActiveDOMObject::stop(); |
- |
- if (m_timer.isActive()) |
- m_timer.stop(); |
- m_pendingActions.clear(); |
-} |
- |
} // namespace blink |