MediaKeys objects are typically created and associated with an HTMLMediaElement,
however it is possible to create a MediaKeys object and not associate it with an
HTMLMediaElement.
This resulted in an issue where these MediaKeys would keep alive other
components that would assert during bowrser shutdown (see bug 1522547). We
anticipated that MediaKeys associated with an HTMLMediaElement would need to be
shutdown if their owning document became inactive, but were not handling the
case where the keys never became associated with an element.
This patch has the MediaKeys listen directly to their owning document for
activity change. The MediaKeys will shutdown if their document becomes inactive.
This avoids MediaKeys not associated with HTMLMediaElements keeping other
objects alive during browser shutdown.
Differential Revision: https://phabricator.services.mozilla.com/D21983
--HG--
extra : moz-landing-system : lando
- Add more logging to MediaKeys.
- Replace the instances of the %d formatter with PRIu32 when printing the
PromiseId type (which has the underlying uint32_t type).
Differential Revision: https://phabricator.services.mozilla.com/D21981
--HG--
extra : moz-landing-system : lando
This field is only used to pass a pointer from the ctor to the Init()
method. Instead, just pass in the crash helper directly.
This avoids some problems with the existing code where the crash
helper is not AddRefed immediately after creation, which could lead to
leaks in some error cases.
Differential Revision: https://phabricator.services.mozilla.com/D17707
--HG--
extra : moz-landing-system : lando
Mostly-mechanical additions:
- Log constructions&destructions, usually by just inheriting from
DecoderDoctorLifeLogger, otherwise with explicit log commands (for internal
classes for which DecoderDoctorTraits can't be specialized),
- Log links between most objects, e.g.: Media element -> decoder -> state
machine -> reader -> demuxer -> resource, etc.
And logging some important properties and events (JS events, duration change,
frames being decoded, etc.)
More will be added later on, from just converting MOZ_LOGs, and as needed.
MozReview-Commit-ID: KgNhHSz35t0
--HG--
extra : rebase_source : dd7206e350e32671adc6f3b9e54ebf777251de2c
We remove the instantiation of EMEVideoDecoder and GMPCDMProxy in Part1. Just delete it and its h/cpp from moz.build
MozReview-Commit-ID: 8kGQK967pR0
--HG--
extra : rebase_source : 77750e6a92e6b649c41e7a8f769fa14c810e8e18
1. Delete MediaPrefs::EMEChromiumAPIEnabled() and related logic.
2. We now only use the Chromium CDM interface so delete the opposite side check of MediaPrefs::EMEChromiumAPIEnabled().
MozReview-Commit-ID: GDFrrf4WlWf
--HG--
extra : rebase_source : 987667dd47757afd58e7da10b60c0e1e1ec89d39
We don't need this, and we don't seem to be using this anyway.
MozReview-Commit-ID: 7NCRO94PN3m
--HG--
extra : rebase_source : de91b099e5e536eb321584990f18025e08c7cc78
We don't need to call MediaKeys::ConnectPendingPromiseIdWithToken() on the
MediaKeySession::Load() path, we already know the session Id, and we've already
removed the session from the list of pending sessions in Load().
MozReview-Commit-ID: KBiEsY95Csi
--HG--
extra : rebase_source : aadc3204409df35e4bbcb9532c530f860681afd1
This allows us to track how often EME CDMs are used, rather than just created.
The telemetry I added in bug 1304207 is reports whenever a CDM is created, but
some sites, such as the Shaka Player demo site, create CDMs without using them,
so that telemetry isn't a great measure in helping us detect when CDMs aren't
being used. Whereas the telemetry added here will report when the CDMs are used
to negotiate a license, i.e. when the CDMs are actually being used.
MozReview-Commit-ID: ExMIcIIBvS1
Add opt-out telemetry probe to track which EME CDMs are being instantiated.
This will enable us to determine when it's safe to remove the Adobe CDM.
MozReview-Commit-ID: iEPSTk7UtP
--HG--
extra : rebase_source : fb51d77f4c15fe2d9ef0adf3c87f6125bb758b9c
So if a GMP crashes while doing EME, we'll get a crash report using the new
mechanism.
MozReview-Commit-ID: G8BlFI9jmiF
--HG--
extra : rebase_source : 1cda5c93ea9e547636b34ec2149ef9cd2506ca73