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

Issue 2551333002: media: Avoid access violation in MojoCdm after connection error (Closed)

Created:
4 years ago by xhwang
Modified:
4 years ago
Reviewers:
jrummell
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, feature-media-reviews_chromium.org, alokp+watch_chromium.org, darin (slow to review), Aaron Boodman
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

media: Avoid access violation in MojoCdm after connection error Upon connection error during CDM initialization, after we rejected and dropped the promise, MojoCdm could be destructed. We should not try to close pending sessions in this case, and in fact we shouldn't have any sessions open before the CDM is successfully initialized. Added a unittest to cover the case where CDM creation failed due to connection error. BUG=652856, 657069 TEST=Manually tested. Also added a new unittest. Committed: https://crrev.com/1f3429ba51d768e7461bb702afb74b234efb7337 Cr-Commit-Position: refs/heads/master@{#436857}

Patch Set 1 #

Patch Set 2 : add unittests #

Total comments: 6

Patch Set 3 : comments addressed #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -8 lines) Patch
M media/base/cdm_session_tracker.h View 1 chunk +6 lines, -3 lines 0 comments Download
M media/base/cdm_session_tracker.cc View 2 chunks +5 lines, -1 line 0 comments Download
M media/mojo/BUILD.gn View 1 1 chunk +1 line, -0 lines 0 comments Download
M media/mojo/clients/mojo_cdm.h View 1 1 chunk +2 lines, -1 line 0 comments Download
M media/mojo/clients/mojo_cdm.cc View 1 2 chunks +10 lines, -3 lines 0 comments Download
A media/mojo/clients/mojo_cdm_unittest.cc View 1 2 1 chunk +120 lines, -0 lines 0 comments Download

Messages

Total messages: 20 (11 generated)
xhwang
PTAL
4 years ago (2016-12-05 22:08:55 UTC) #3
jrummell
lgtm
4 years ago (2016-12-05 23:25:48 UTC) #5
xhwang
I added a unittest with which I can repro the crash without the fix in ...
4 years ago (2016-12-06 20:44:34 UTC) #8
jrummell
Test looks good. Still lgtm w/nits. https://codereview.chromium.org/2551333002/diff/20001/media/mojo/clients/mojo_cdm_unittest.cc File media/mojo/clients/mojo_cdm_unittest.cc (right): https://codereview.chromium.org/2551333002/diff/20001/media/mojo/clients/mojo_cdm_unittest.cc#newcode80 media/mojo/clients/mojo_cdm_unittest.cc:80: const std::string& error_message) ...
4 years ago (2016-12-06 21:07:07 UTC) #10
xhwang
https://codereview.chromium.org/2551333002/diff/20001/media/mojo/clients/mojo_cdm_unittest.cc File media/mojo/clients/mojo_cdm_unittest.cc (right): https://codereview.chromium.org/2551333002/diff/20001/media/mojo/clients/mojo_cdm_unittest.cc#newcode80 media/mojo/clients/mojo_cdm_unittest.cc:80: const std::string& error_message) { On 2016/12/06 21:07:07, jrummell wrote: ...
4 years ago (2016-12-06 21:33:43 UTC) #11
xhwang
comments addressed
4 years ago (2016-12-06 21:33:57 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2551333002/40001
4 years ago (2016-12-07 00:59:12 UTC) #15
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-12-07 04:16:50 UTC) #18
commit-bot: I haz the power
4 years ago (2016-12-07 04:19:19 UTC) #20
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/1f3429ba51d768e7461bb702afb74b234efb7337
Cr-Commit-Position: refs/heads/master@{#436857}

Powered by Google App Engine
This is Rietveld 408576698