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

Issue 2402563002: Keep reference to CDM to avoid it's premature destruction (Closed)

Created:
4 years, 2 months ago by jrummell
Modified:
4 years, 2 months ago
Reviewers:
xhwang
CC:
chromium-reviews, feature-media-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Keep reference to CDM to avoid it's premature destruction Occassionally the CDM object is destroyed before the pipeline that uses it is stopped, so have WebMediaPlayerImpl keep a reference to it to prevent this from happening. This worked in the past as the pipeline was destroyed from HTMLMediaElement::stop() while the CDM was destroyed later from MediaKeys::contextDestroyed(). A recent change merged stop() and contextDestroyed(), so the CDM can be freed before WebMediaPlayerImpl is done with it. BUG=652978, 653001 TEST=EME layout tests pass Committed: https://crrev.com/e616ee95642ecc0b168a8e807abc86ff3633cda8 Cr-Commit-Position: refs/heads/master@{#424046}

Patch Set 1 #

Total comments: 4

Patch Set 2 : MediaKeys #

Total comments: 18

Patch Set 3 : changes #

Total comments: 6

Patch Set 4 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -39 lines) Patch
M media/blink/cdm_session_adapter.h View 1 2 1 chunk +2 lines, -4 lines 0 comments Download
M media/blink/cdm_session_adapter.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M media/blink/webcontentdecryptionmodule_impl.h View 1 2 2 chunks +3 lines, -5 lines 0 comments Download
M media/blink/webcontentdecryptionmodule_impl.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 chunks +11 lines, -5 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 6 chunks +42 lines, -21 lines 0 comments Download

Messages

Total messages: 16 (6 generated)
jrummell
PTAL. I do get crashes on ToT without this.
4 years, 2 months ago (2016-10-07 01:50:30 UTC) #2
xhwang
Thanks! Please see the comments. Also, could you please explain in the CL description why ...
4 years, 2 months ago (2016-10-07 05:02:14 UTC) #3
jrummell
Updated to save MediaKeys. https://codereview.chromium.org/2402563002/diff/1/media/blink/webcontentdecryptionmodule_impl.h File media/blink/webcontentdecryptionmodule_impl.h (right): https://codereview.chromium.org/2402563002/diff/1/media/blink/webcontentdecryptionmodule_impl.h#newcode61 media/blink/webcontentdecryptionmodule_impl.h:61: CdmSessionAdapter* GetCdmAdapterReference(); On 2016/10/07 05:02:14, ...
4 years, 2 months ago (2016-10-07 20:15:30 UTC) #4
xhwang
Thanks! The general approach is good and thanks for carching the bug. More comments :) ...
4 years, 2 months ago (2016-10-07 20:44:31 UTC) #6
jrummell
Updated. https://codereview.chromium.org/2402563002/diff/20001/media/blink/cdm_session_adapter.h File media/blink/cdm_session_adapter.h (right): https://codereview.chromium.org/2402563002/diff/20001/media/blink/cdm_session_adapter.h#newcode94 media/blink/cdm_session_adapter.h:94: scoped_refptr<MediaKeys> GetCdmReference(); On 2016/10/07 20:44:31, xhwang wrote: > ...
4 years, 2 months ago (2016-10-07 23:46:46 UTC) #7
xhwang
Thanks! lgtm with nits https://codereview.chromium.org/2402563002/diff/40001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2402563002/diff/40001/media/blink/webmediaplayer_impl.cc#newcode963 media/blink/webmediaplayer_impl.cc:963: // after the pipeline is ...
4 years, 2 months ago (2016-10-08 00:16:00 UTC) #8
jrummell
Thanks for the reviews. https://codereview.chromium.org/2402563002/diff/40001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2402563002/diff/40001/media/blink/webmediaplayer_impl.cc#newcode963 media/blink/webmediaplayer_impl.cc:963: // after the pipeline is ...
4 years, 2 months ago (2016-10-08 00:32:18 UTC) #9
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/2402563002/60001
4 years, 2 months ago (2016-10-08 00:33:07 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 2 months ago (2016-10-08 02:16:03 UTC) #14
commit-bot: I haz the power
4 years, 2 months ago (2016-10-08 02:18:18 UTC) #16
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/e616ee95642ecc0b168a8e807abc86ff3633cda8
Cr-Commit-Position: refs/heads/master@{#424046}

Powered by Google App Engine
This is Rietveld 408576698