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
--- 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)