Closed Bug 1187113 Opened 9 years ago Closed 9 years ago

[EME] Add more logging around EME promise rejects and method calls

Categories

(Core :: Audio/Video: Playback, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla42
Tracking Status
firefox42 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

It would be handy to have more logging surround EME function calls, especially navigator.requestMediaKeySystemAccess(), and promise rejects.
Component: Video/Audio → Video/Audio: Playback
Add more logging around EME methods, particularly the ones that we have trouble with (i.e. we log not having a valid plugin-container voucher to console and in the exception message). Also log promise rejects/resolves, including the message that rejects.
Assignee: nobody → cpearce
Status: NEW → ASSIGNED
Attachment #8638226 - Flags: review?(edwin)
Comment on attachment 8638226 [details] [diff] [review]
Patch: Add more logging

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

::: dom/media/eme/MediaKeys.cpp
@@ +148,5 @@
>  MediaKeys::SetServerCertificate(const ArrayBufferViewOrArrayBuffer& aCert, ErrorResult& aRv)
>  {
>    nsRefPtr<DetailedPromise>
> +    promise(MakePromise(aRv,
> +                        NS_LITERAL_CSTRING("MediaKeys.setServerCertificate")));

Inconsistent indent.

@@ +297,5 @@
>  MediaKeys::Init(ErrorResult& aRv)
>  {
>    nsRefPtr<DetailedPromise>
> +    promise(MakePromise(aRv,
> +                        NS_LITERAL_CSTRING("MediaKeys::Init()")));

MediaKeySystemAccess.createMediaKeys

Also indent is inconsistent with rest of patch.
Attachment #8638226 - Flags: review?(edwin) → review+
Comment on attachment 8638226 [details] [diff] [review]
Patch: Add more logging

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

::: dom/base/Navigator.cpp
@@ +2750,5 @@
> +        logMsg.AppendPrintf("initDataType='%s',",
> +          NS_ConvertUTF16toUTF8(op.mInitDataType).get());
> +      }
> +      logMsg.AppendPrintf("stateful='%s',",
> +        MediaKeysRequirementValues::strings[(size_t)op.mStateful]);

d'oh!

This needed to be:

MediaKeysRequirementValues::strings[(size_t)op.mStateful].value

Yay unsafe printf.
https://hg.mozilla.org/mozilla-central/rev/d03735ae65b8
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: