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

Unified Diff: media/mojo/clients/mojo_cdm.cc

Issue 2656833003: media: Reject promises and close sessions in MojoCdm destructor (Closed)
Patch Set: 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | media/mojo/clients/mojo_cdm_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/clients/mojo_cdm.cc
diff --git a/media/mojo/clients/mojo_cdm.cc b/media/mojo/clients/mojo_cdm.cc
index 10331747668601d06a161a7dd99a78182a7a1997..657659d8afabacf32810c73e2c3cb2d0fb390344 100644
--- a/media/mojo/clients/mojo_cdm.cc
+++ b/media/mojo/clients/mojo_cdm.cc
@@ -83,6 +83,10 @@ MojoCdm::~MojoCdm() {
!decryptor_task_runner_->BelongsToCurrentThread() && decryptor_) {
decryptor_task_runner_->DeleteSoon(FROM_HERE, decryptor_.release());
}
+
+ // Reject any outstanding promises and close all the existing sessions.
+ cdm_promise_adapter_.Clear();
+ cdm_session_tracker_.CloseRemainingSessions(session_closed_cb_);
}
// Using base::Unretained(this) below is safe because |this| owns |remote_cdm_|,
« no previous file with comments | « no previous file | media/mojo/clients/mojo_cdm_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698