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
Review URL: https://codereview.chromium.org/1249913002
git-svn-id: svn://svn.chromium.org/blink/trunk@199421 bbb929c8-8fbe-4397-9dbb-9b2b20218538
2 files changed