Closed Bug 1353030 Opened 7 years ago Closed 7 years ago

cleanup and document WrapRunnable uses

Categories

(Core :: Audio/Video: GMP, enhancement, P2)

45 Branch
enhancement

Tracking

()

RESOLVED FIXED
mozilla55
Tracking Status
firefox55 --- fixed

People

(Reporter: jesup, Assigned: jesup)

Details

Attachments

(1 file)

Just documenting WrapRunnable(this, ...) uses; there's one in gmp that due to paranoia I want to wrap, though it's only used for force-crashing GMP instances.
Rank: 22
MozReview-Commit-ID: Fb3KjsI9tE3
Attachment #8854008 - Flags: review?(cpearce)
Comment on attachment 8854008 [details] [diff] [review]
document use of WrapRunnable(this)

Review of attachment 8854008 [details] [diff] [review]:
-----------------------------------------------------------------

::: dom/media/gmp/GMPServiceParent.cpp
@@ +273,5 @@
>            MutexAutoLock lock(mMutex);
>            gmpThread = mGMPThread;
>          }
>          if (gmpThread) {
> +          gmpThread->Dispatch(WrapRunnable(RefPtr<GeckoMediaPluginServiceParent>(this),

I'd point out that the GeckoMediaPluginServiceParent singleton is kept alive by a static refptr that is only cleared in the final stage of shutdown after everything else is shutdown:
https://dxr.mozilla.org/mozilla-central/rev/38894655c89e68bcd8f45d31a0d3005f2c2b53db/dom/media/gmp/GMPService.cpp#123

So while I think the refcount here is a good idea for future-proofing the code, I think it's unlikely it will actually prevent any problems.
Attachment #8854008 - Flags: review?(cpearce) → review+
Pushed by rjesup@wgate.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/39f8ae0ea97f
document use of WrapRunnable(this) r=cpearce
https://hg.mozilla.org/mozilla-central/rev/39f8ae0ea97f
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla55
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: