Closed
      
        Bug 1187113
      
      
        Opened 10 years ago
          Closed 10 years ago
      
        
    
  
[EME] Add more logging around EME promise rejects and method calls
Categories
(Core :: Audio/Video: Playback, defect)
        Core
          
        
        
      
        
    
        Audio/Video: Playback
          
        
        
      
        
    Tracking
()
        RESOLVED
        FIXED
        
    
  
        
            mozilla42
        
    
  
| Tracking | Status | |
|---|---|---|
| firefox42 | --- | fixed | 
People
(Reporter: cpearce, Assigned: cpearce)
References
Details
Attachments
(1 file)
| 21.37 KB,
          patch         | eflores
:
              
              review+ | Details | Diff | Splinter Review | 
It would be handy to have more logging surround EME function calls, especially navigator.requestMediaKeySystemAccess(), and promise rejects.
| Assignee | ||
| Updated•10 years ago
           | 
Component: Video/Audio → Video/Audio: Playback
| Assignee | ||
| Comment 1•10 years ago
           | ||
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.
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+
| Assignee | ||
| Comment 3•10 years ago
           | ||
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.
| Comment 5•10 years ago
           | ||
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
          status-firefox42:
          --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
          You need to log in
          before you can comment on or make changes to this bug.
        
 
 
Description
•