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

Issue 1249913002: Make ContentDecryptionModuleResult cross-thread destructible. (Closed)

Created:
5 years, 5 months ago by sof
Modified:
5 years, 3 months ago
CC:
blink-reviews, mlamouri+watch-blink_chromium.org, feature-media-reviews_chromium.org, philipj_slow, eric.carlson_apple.com
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Make ContentDecryptionModuleResult cross-thread destructible. So as to handle cross-thread uses of the corresponding WebContentDecryptionModuleResult (WCDMResult), have WCDMResult keep a cross-thread persistent (CrossThreadPersistent<>) by way of its WebPrivatePtr<> reference. CrossThreadPersistent<> can be destructed on a thread other than the Oilpan thread creating it; the thread does not have to be attached to Oilpan. To control if WebPrivatePtr<> should use a cross-thread persistent or not, it is now parameterized over an enum controlling which. The default is to use same-thread persistents. If WebPrivatePtr<T, AllowCrossThreadDestruction> is for a ref-counted T, T must derive from ThreadSafeRefCounted<T>. R=jrummell,xhwang,haraken,tkent BUG=509588 Committed: https://crrev.com/106afb0edc37323671b75709967f463095b250f1 git-svn-id: svn://svn.chromium.org/blink/trunk@199421 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Patch Set 1 #

Patch Set 2 : Prevent Persistents being destructed on non-Oilpan threads #

Patch Set 3 : rebased #

Patch Set 4 : use CrossThreadPersistent<> instead #

Total comments: 1

Patch Set 5 : Give WebPrivatePtr<> control over cross-thread destruction #

Patch Set 6 : canonicalize naming (type => Type) #

Total comments: 2

Patch Set 7 : Follow enum tag naming scheme #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -23 lines) Patch
M public/platform/WebContentDecryptionModuleResult.h View 1 2 3 4 5 6 1 chunk +1 line, -1 line 0 comments Download
M public/platform/WebPrivatePtr.h View 1 2 3 4 5 6 10 chunks +46 lines, -22 lines 0 comments Download

Messages

Total messages: 21 (5 generated)
sof
please take a look. tricky terrain, but i think we need to be more careful ...
5 years, 5 months ago (2015-07-22 09:04:37 UTC) #2
jrummell
Interesting way of doing it. lgtm for cdmResult.
5 years, 5 months ago (2015-07-22 21:58:29 UTC) #3
xhwang
jrummell and I looked at this and it seems cool (though it took us a ...
5 years, 5 months ago (2015-07-22 22:00:44 UTC) #4
haraken
Thanks for looking into this issue! Appreciated it. Mostly looks good to me. https://codereview.chromium.org/1249913002/diff/60001/public/platform/WebPrivatePtr.h File ...
5 years, 5 months ago (2015-07-23 01:41:41 UTC) #6
sof
On 2015/07/23 01:41:41, haraken wrote: > Thanks for looking into this issue! Appreciated it. > ...
5 years, 5 months ago (2015-07-23 05:24:14 UTC) #7
haraken
On 2015/07/23 05:24:14, sof wrote: > On 2015/07/23 01:41:41, haraken wrote: > > Thanks for ...
5 years, 5 months ago (2015-07-23 07:40:47 UTC) #8
sof
On 2015/07/23 07:40:47, haraken wrote: > On 2015/07/23 05:24:14, sof wrote: > > On 2015/07/23 ...
5 years, 5 months ago (2015-07-23 08:59:48 UTC) #9
haraken
On 2015/07/23 08:59:48, sof wrote: > On 2015/07/23 07:40:47, haraken wrote: > > On 2015/07/23 ...
5 years, 5 months ago (2015-07-23 10:46:10 UTC) #10
sof
On 2015/07/23 10:46:10, haraken wrote: > On 2015/07/23 08:59:48, sof wrote: ... > to > ...
5 years, 5 months ago (2015-07-23 11:01:09 UTC) #11
haraken
LGTM On 2015/07/23 11:01:09, sof wrote: > On 2015/07/23 10:46:10, haraken wrote: > > On ...
5 years, 5 months ago (2015-07-23 11:44:11 UTC) #12
sof
haraken wrote: > ... > > Modulo getting that WebPrivatePtr<> change ready here, the question ...
5 years, 5 months ago (2015-07-23 12:03:11 UTC) #14
tkent
lgtm https://codereview.chromium.org/1249913002/diff/100001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/1249913002/diff/100001/public/platform/WebPrivatePtr.h#newcode51 public/platform/WebPrivatePtr.h:51: SameThreadDestruction, The enum items should be WebPrivatePtrDestructionSameThread and ...
5 years, 5 months ago (2015-07-23 23:28:09 UTC) #15
sof
https://codereview.chromium.org/1249913002/diff/100001/public/platform/WebPrivatePtr.h File public/platform/WebPrivatePtr.h (right): https://codereview.chromium.org/1249913002/diff/100001/public/platform/WebPrivatePtr.h#newcode51 public/platform/WebPrivatePtr.h:51: SameThreadDestruction, On 2015/07/23 23:28:09, tkent wrote: > The enum ...
5 years, 5 months ago (2015-07-24 05:25:22 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1249913002/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1249913002/120001
5 years, 5 months ago (2015-07-24 05:25:50 UTC) #19
commit-bot: I haz the power
Committed patchset #7 (id:120001) as https://src.chromium.org/viewvc/blink?view=rev&revision=199421
5 years, 5 months ago (2015-07-24 07:38:22 UTC) #20
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 11:45:44 UTC) #21
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/106afb0edc37323671b75709967f463095b250f1

Powered by Google App Engine
This is Rietveld 408576698