Closed Bug 1712346 Opened 3 years ago Closed 3 years ago

Store GMP thread in ChromiumCDMParent and assert methods run on it

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
90 Branch
Tracking Status
firefox90 --- fixed

People

(Reporter: bryce, Assigned: bryce)

Details

Attachments

(1 file)

Media code widely uses the convention of MOZ_ASSERTing the thread we expect to be on at the start of functions and methods. This serves the dual purpose of enforcing invariants and documenting the threading model. ChromiumCDMParent always expects to run on the GMP thread of the content process, but doesn't have asserts enforcing this.

While ChromiumCDMParent doesn't need to hold a reference to the GMP thread, I think it would be valuable to do so, perhaps as a debug only member. Then we can use asserts to enforce and document. IMO the benefits of documenting the model are worth some extra (debug only) code.

Pushed by bvandyk@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/e6e9f5b16b9f
Use MOZ_ASSERT to enforce and document ChromiumCDMParent threading model. r=alwu
Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 90 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: