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

Issue 11477002: Fix in process PPAPI decryption. (Closed)

Created:
8 years ago by Tom Finegan
Modified:
8 years ago
CC:
chromium-reviews, darin-cc_chromium.org, fgalligan1
Visibility:
Public.

Description

Fix in process PPAPI decryption. TEST=EME content decryption via ExternalClearKey works in-process. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=172211

Patch Set 1 #

Total comments: 7

Patch Set 2 : Better fix... maybe. #

Patch Set 3 : Remove unused include. #

Patch Set 4 : Rebase and add comments about input buffer references. #

Patch Set 5 : Explain why the plugin must not hold resource refs after Deliver*() calls. #

Patch Set 6 : Add comments about holding references to input resources to the CPP interface. #

Patch Set 7 : Re-run ppapi/generator.py #

Patch Set 8 : Run generator.py on a linux box, and cross fingers...? #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -26 lines) Patch
M ppapi/api/private/ppb_content_decryptor_private.idl View 1 2 3 4 5 3 chunks +16 lines, -2 lines 0 comments Download
M ppapi/c/private/ppb_content_decryptor_private.h View 1 2 3 4 5 6 7 4 chunks +17 lines, -3 lines 0 comments Download
M ppapi/cpp/private/content_decryptor_private.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -0 lines 0 comments Download
M ppapi/cpp/private/content_decryptor_private.cc View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M ppapi/proxy/ppp_content_decryptor_private_proxy.cc View 1 2 2 chunks +0 lines, -19 lines 1 comment Download

Messages

Total messages: 26 (0 generated)
Tom Finegan
PTAL, it's just a single line. I need to add in some logging to make ...
8 years ago (2012-12-06 18:06:29 UTC) #1
Tom Finegan
On 2012/12/06 18:06:29, Tom Finegan wrote: > PTAL, it's just a single line. I need ...
8 years ago (2012-12-06 18:15:38 UTC) #2
xhwang
+dmichael for insights. https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc File webkit/plugins/ppapi/content_decryptor_delegate.cc (right): https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc#newcode1026 webkit/plugins/ppapi/content_decryptor_delegate.cc:1026: *resource = media_resource; Shouldn't this line ...
8 years ago (2012-12-06 18:17:22 UTC) #3
Tom Finegan
https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc File webkit/plugins/ppapi/content_decryptor_delegate.cc (right): https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc#newcode1026 webkit/plugins/ppapi/content_decryptor_delegate.cc:1026: *resource = media_resource; On 2012/12/06 18:17:23, xhwang wrote: > ...
8 years ago (2012-12-06 18:32:59 UTC) #4
Tom Finegan
On 2012/12/06 18:32:59, Tom Finegan wrote: > https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc > File webkit/plugins/ppapi/content_decryptor_delegate.cc (right): > > https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc#newcode1026 ...
8 years ago (2012-12-06 18:33:32 UTC) #5
xhwang
On 2012/12/06 18:33:32, Tom Finegan wrote: > On 2012/12/06 18:32:59, Tom Finegan wrote: > > ...
8 years ago (2012-12-06 18:47:34 UTC) #6
Tom Finegan
On 2012/12/06 18:47:34, xhwang wrote: > On 2012/12/06 18:33:32, Tom Finegan wrote: > > On ...
8 years ago (2012-12-06 19:04:36 UTC) #7
dmichael (off chromium)
https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc File webkit/plugins/ppapi/content_decryptor_delegate.cc (right): https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc#newcode1009 webkit/plugins/ppapi/content_decryptor_delegate.cc:1009: PpapiGlobals::Get()->GetResourceTracker()->AddRefResource(media_resource); If you need an extra reference, then don't ...
8 years ago (2012-12-06 19:30:09 UTC) #8
Tom Finegan
dmichael, PTAL: You're correct as far as out of control ref counts is concerned. The ...
8 years ago (2012-12-06 22:59:02 UTC) #9
dmichael (off chromium)
lgtm https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc File webkit/plugins/ppapi/content_decryptor_delegate.cc (right): https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc#newcode1026 webkit/plugins/ppapi/content_decryptor_delegate.cc:1026: *resource = media_resource; On 2012/12/06 22:59:02, Tom Finegan ...
8 years ago (2012-12-07 22:53:35 UTC) #10
Tom Finegan
On 2012/12/07 22:53:35, dmichael wrote: > lgtm > > https://codereview.chromium.org/11477002/diff/1/webkit/plugins/ppapi/content_decryptor_delegate.cc > File webkit/plugins/ppapi/content_decryptor_delegate.cc (right): > ...
8 years ago (2012-12-08 07:14:24 UTC) #11
xhwang
On 2012/12/08 07:14:24, Tom Finegan wrote: > On 2012/12/07 22:53:35, dmichael wrote: > > lgtm ...
8 years ago (2012-12-08 08:07:14 UTC) #12
Tom Finegan
On 2012/12/08 08:07:14, xhwang wrote: > On 2012/12/08 07:14:24, Tom Finegan wrote: > > On ...
8 years ago (2012-12-09 20:11:23 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tomfinegan@chromium.org/11477002/12001
8 years ago (2012-12-09 20:12:09 UTC) #14
commit-bot: I haz the power
Retried try job too often on mac_rel for step(s) unit_tests
8 years ago (2012-12-09 21:34:49 UTC) #15
dmichael (off chromium)
This change lgtm; but I'm not convinced about my other comments... On Sat, Dec 8, ...
8 years ago (2012-12-10 17:47:32 UTC) #16
xhwang
On 2012/12/10 17:47:32, dmichael wrote: > This change lgtm; but I'm not convinced about my ...
8 years ago (2012-12-10 18:13:18 UTC) #17
ddorwin
Thanks for clarifying and catching this, dmichael. I think a comment makes sense because of ...
8 years ago (2012-12-10 18:47:07 UTC) #18
dmichael (off chromium)
On Mon, Dec 10, 2012 at 11:47 AM, <ddorwin@chromium.org> wrote: > Thanks for clarifying and ...
8 years ago (2012-12-10 19:43:12 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tomfinegan@chromium.org/11477002/29002
8 years ago (2012-12-10 20:55:12 UTC) #20
commit-bot: I haz the power
Presubmit check for 11477002-29002 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-10 20:55:16 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tomfinegan@chromium.org/11477002/31003
8 years ago (2012-12-10 21:19:39 UTC) #22
commit-bot: I haz the power
Presubmit check for 11477002-31003 failed and returned exit status 1. Running presubmit commit checks ...
8 years ago (2012-12-10 21:19:50 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tomfinegan@chromium.org/11477002/32005
8 years ago (2012-12-10 21:48:16 UTC) #24
commit-bot: I haz the power
Change committed as 172211
8 years ago (2012-12-11 00:41:24 UTC) #25
dmichael (off chromium)
8 years ago (2012-12-13 19:20:35 UTC) #26
Message was sent while issue was closed.
https://chromiumcodereview.appspot.com/11477002/diff/32005/ppapi/proxy/ppp_co...
File ppapi/proxy/ppp_content_decryptor_private_proxy.cc (left):

https://chromiumcodereview.appspot.com/11477002/diff/32005/ppapi/proxy/ppp_co...
ppapi/proxy/ppp_content_decryptor_private_proxy.cc:92: }
I was confused when reading the CL...  I think this AddRef still needs to
happen. What you're doing here is making sure that the Buffer Resource stays
valid long enough for the Plugin to take it. The messages you send (e.g., to
Decrypt) are asynchronous. If you don't AddRef them before sending them, I think
it's possible that the Buffer will be released before the plugin is done with
it.

I think you want to AddRef here (or maybe just before you send it, to make it
easier to balance?).

Maybe AddRefing right before you send, then RemoveRef on the plugin side right
after you call the related PPP function.

Powered by Google App Engine
This is Rietveld 408576698