New issue
Advanced search Search tips

Issue 671362 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 2
Type: Bug



Sign in to add a comment

MojoCdm should reject CDM calls after connection error.

Project Member Reported by xhw...@chromium.org, Dec 5 2016

Issue description

Today I believe it will just silently fail.
 
Cc: -jrumm...@chromium.org xhw...@chromium.org
Labels: M-57
Owner: jrumm...@chromium.org
Also, today the promise is bound into the callback in MojoCdm, e.g. 

https://cs.chromium.org/chromium/src/media/mojo/clients/mojo_cdm.cc?rcl=0&l=153

If after making the call, but before the callback is fired, a connection error happens, it's possible that the callback will not be fired. In that case, the promise will only be rejected when the callback is dropped (guessing). We should understand more what's happening and fix it.

The easiest fix would be to store the pending promise as a class member instead of binding the promise into the callback.
BTW, #2 can be in a different CL.
Status: Started (was: Assigned)
Project Member

Comment 5 by bugdroid1@chromium.org, Dec 16 2016

Project Member

Comment 6 by bugdroid1@chromium.org, Jan 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0d5d318987dde8b60ca474976128c5543b2e2563

commit 0d5d318987dde8b60ca474976128c5543b2e2563
Author: jrummell <jrummell@chromium.org>
Date: Sat Jan 07 00:15:22 2017

Test breaking the mojo connection to MojoCdm

Improve the testing on MojoCdm by adding a MockCdm. This allows for
testing that:
- resolving the promise works
- rejecting the promise works
- closing the connection before a call works
- closing the connection while executing the call works.

BUG= 671362 
TEST=new tests pass

Review-Url: https://codereview.chromium.org/2592913002
Cr-Commit-Position: refs/heads/master@{#442104}

[modify] https://crrev.com/0d5d318987dde8b60ca474976128c5543b2e2563/media/base/mock_filters.cc
[modify] https://crrev.com/0d5d318987dde8b60ca474976128c5543b2e2563/media/base/mock_filters.h
[modify] https://crrev.com/0d5d318987dde8b60ca474976128c5543b2e2563/media/mojo/clients/mojo_cdm.cc
[modify] https://crrev.com/0d5d318987dde8b60ca474976128c5543b2e2563/media/mojo/clients/mojo_cdm.h
[modify] https://crrev.com/0d5d318987dde8b60ca474976128c5543b2e2563/media/mojo/clients/mojo_cdm_unittest.cc

Status: Fixed (was: Started)
Project Member

Comment 8 by bugdroid1@chromium.org, Jan 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/fc12d84bae452abfef8e6e110908305ad5401a77

commit fc12d84bae452abfef8e6e110908305ad5401a77
Author: xhwang <xhwang@chromium.org>
Date: Fri Jan 20 18:14:43 2017

media: Reject promises and close sessions in MojoCdm destructor

This was missed in the original CL at 0d5d318987dde8b.

BUG= 671362 , 682863 
TEST=new test added

Review-Url: https://codereview.chromium.org/2638403005
Cr-Commit-Position: refs/heads/master@{#445093}

[modify] https://crrev.com/fc12d84bae452abfef8e6e110908305ad5401a77/media/mojo/clients/mojo_cdm.cc
[modify] https://crrev.com/fc12d84bae452abfef8e6e110908305ad5401a77/media/mojo/clients/mojo_cdm_unittest.cc

Project Member

Comment 9 by bugdroid1@chromium.org, Jan 25 2017

Labels: merge-merged-2987
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/360a7fda6014a54cac1c40aed6548a52b90ae0ca

commit 360a7fda6014a54cac1c40aed6548a52b90ae0ca
Author: xhwang <xhwang@chromium.org>
Date: Wed Jan 25 21:49:41 2017

media: Reject promises and close sessions in MojoCdm destructor

This was missed in the original CL at 0d5d318987dde8b.

NOTRY=true
NOPRESUBMIT=true
TBR=jrummell@chromium.org
BUG= 671362 , 682863 
TEST=new test added

Review-Url: https://codereview.chromium.org/2638403005
Cr-Commit-Position: refs/heads/master@{#445093}
(cherry picked from commit fc12d84bae452abfef8e6e110908305ad5401a77)

Review-Url: https://codereview.chromium.org/2656833003
Cr-Commit-Position: refs/branch-heads/2987@{#96}
Cr-Branched-From: ad51088c0e8776e8dcd963dbe752c4035ba6dab6-refs/heads/master@{#444943}

[modify] https://crrev.com/360a7fda6014a54cac1c40aed6548a52b90ae0ca/media/mojo/clients/mojo_cdm.cc
[modify] https://crrev.com/360a7fda6014a54cac1c40aed6548a52b90ae0ca/media/mojo/clients/mojo_cdm_unittest.cc

Sign in to add a comment