Bug 1109457 - Hook up CDM session close notification to MediaKeySession. r=jwwang
authorChris Pearce <cpearce@mozilla.com>
Thu, 11 Dec 2014 15:59:37 +1300
changeset 219237 5ddb36faf9ee9eaef191d1140ae1e9f96daae6c2
parent 219236 1a2cec4f5833bc4583686dcc273f9734eeab2ff9
child 219238 8dbf60547db00bec3f9a6913590df69ad57e2503
push id10368
push userkwierso@gmail.com
push dateFri, 12 Dec 2014 01:38:39 +0000
treeherderfx-team@5288b15d22de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwwang
bugs1109457
milestone37.0a1
Bug 1109457 - Hook up CDM session close notification to MediaKeySession. r=jwwang
dom/media/eme/CDMProxy.cpp
--- a/dom/media/eme/CDMProxy.cpp
+++ b/dom/media/eme/CDMProxy.cpp
@@ -439,17 +439,23 @@ CDMProxy::OnExpirationChange(const nsASt
   MOZ_ASSERT(NS_IsMainThread());
   NS_WARNING("CDMProxy::OnExpirationChange() not implemented");
 }
 
 void
 CDMProxy::OnSessionClosed(const nsAString& aSessionId)
 {
   MOZ_ASSERT(NS_IsMainThread());
-  NS_WARNING("CDMProxy::OnSessionClosed() not implemented");
+  if (mKeys.IsNull()) {
+    return;
+  }
+  nsRefPtr<dom::MediaKeySession> session(mKeys->GetSession(aSessionId));
+  if (session) {
+    session->OnClosed();
+  }
 }
 
 static void
 LogToConsole(const nsAString& aMsg)
 {
   nsCOMPtr<nsIConsoleService> console(
     do_GetService("@mozilla.org/consoleservice;1"));
   if (!console) {