Bug 1334111 - Log MediaKeySystemConfiguration on creation of MediaKeySystemAccess. r=gerald draft
authorChris Pearce <cpearce@mozilla.com>
Mon, 29 May 2017 11:02:15 +1200
changeset 585829 e47e60f5091b6b5477b2c8bd63ba408922706082
parent 585828 a2dfeb7b263108ac1c60bfe2f47755e0a73d6324
child 585830 0dcbbc165c7742cba24644ede4ecacba3d79e07c
child 586109 268f9e0eee2a84ee6988ef35afe2eecf57d377d6
push id61199
push usercpearce@mozilla.com
push dateMon, 29 May 2017 03:30:36 +0000
reviewersgerald
bugs1334111
milestone55.0a1
Bug 1334111 - Log MediaKeySystemConfiguration on creation of MediaKeySystemAccess. r=gerald This makes it easier to tell what's going on; whether we've created a MediaKeySystemConfiguration which can persist state. MozReview-Commit-ID: L4dbmMVYhsM
dom/media/eme/MediaKeySystemAccess.cpp
--- a/dom/media/eme/MediaKeySystemAccess.cpp
+++ b/dom/media/eme/MediaKeySystemAccess.cpp
@@ -45,23 +45,28 @@ NS_IMPL_CYCLE_COLLECTION_WRAPPERCACHE(Me
                                       mParent)
 NS_IMPL_CYCLE_COLLECTING_ADDREF(MediaKeySystemAccess)
 NS_IMPL_CYCLE_COLLECTING_RELEASE(MediaKeySystemAccess)
 NS_INTERFACE_MAP_BEGIN_CYCLE_COLLECTION(MediaKeySystemAccess)
   NS_WRAPPERCACHE_INTERFACE_MAP_ENTRY
   NS_INTERFACE_MAP_ENTRY(nsISupports)
 NS_INTERFACE_MAP_END
 
+static nsCString
+ToCString(const MediaKeySystemConfiguration& aConfig);
+
 MediaKeySystemAccess::MediaKeySystemAccess(nsPIDOMWindowInner* aParent,
                                            const nsAString& aKeySystem,
                                            const MediaKeySystemConfiguration& aConfig)
   : mParent(aParent)
   , mKeySystem(aKeySystem)
   , mConfig(aConfig)
 {
+  EME_LOG("Created MediaKeySystemAccess for keysystem=%s config=%s",
+          NS_ConvertUTF16toUTF8(mKeySystem).get(), mozilla::dom::ToCString(mConfig).get());
 }
 
 MediaKeySystemAccess::~MediaKeySystemAccess()
 {
 }
 
 JSObject*
 MediaKeySystemAccess::WrapObject(JSContext* aCx, JS::Handle<JSObject*> aGivenProto)