Bug 1540136 - P1: Log more info in ChromiumCDMProxy dtor and Shutdown. r=cpearce
authorBryce Van Dyk <bvandyk@mozilla.com>
Tue, 09 Apr 2019 15:05:01 +0000
changeset 527394 7c83e08566d34fe194069a5219a16755d1cbe757
parent 527393 de1c51fce80e5bee60661bff92e2006970ecd760
child 527395 bc7e92510e95a39fef9f9fc32224c416e9d6f11f
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce
bugs1540136
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1540136 - P1: Log more info in ChromiumCDMProxy dtor and Shutdown. r=cpearce Also remove unneeded MOZ_COUNT_[CTOR|DTOR] macros. We already get similar functionality from NS_INLINE_DECL_THREADSAFE_REFCOUNTING. Differential Revision: https://phabricator.services.mozilla.com/D26204
dom/media/gmp/ChromiumCDMProxy.cpp
--- a/dom/media/gmp/ChromiumCDMProxy.cpp
+++ b/dom/media/gmp/ChromiumCDMProxy.cpp
@@ -24,20 +24,21 @@ ChromiumCDMProxy::ChromiumCDMProxy(dom::
                                    bool aPersistentStateRequired,
                                    nsIEventTarget* aMainThread)
     : CDMProxy(aKeys, aKeySystem, aDistinctiveIdentifierRequired,
                aPersistentStateRequired, aMainThread),
       mCrashHelper(aCrashHelper),
       mCDMMutex("ChromiumCDMProxy"),
       mGMPThread(GetGMPAbstractThread()) {
   MOZ_ASSERT(NS_IsMainThread());
-  MOZ_COUNT_CTOR(ChromiumCDMProxy);
 }
 
-ChromiumCDMProxy::~ChromiumCDMProxy() { MOZ_COUNT_DTOR(ChromiumCDMProxy); }
+ChromiumCDMProxy::~ChromiumCDMProxy() {
+  EME_LOG("ChromiumCDMProxy::~ChromiumCDMProxy(this=%p)", this);
+}
 
 void ChromiumCDMProxy::Init(PromiseId aPromiseId, const nsAString& aOrigin,
                             const nsAString& aTopLevelOrigin,
                             const nsAString& aGMPName) {
   MOZ_ASSERT(NS_IsMainThread());
 
   RefPtr<GMPCrashHelper> helper(std::move(mCrashHelper));
 
@@ -300,17 +301,17 @@ void ChromiumCDMProxy::RemoveSession(con
   mGMPThread->Dispatch(NewRunnableMethod<nsCString, uint32_t>(
       "gmp::ChromiumCDMParent::RemoveSession", cdm,
       &gmp::ChromiumCDMParent::RemoveSession, NS_ConvertUTF16toUTF8(aSessionId),
       aPromiseId));
 }
 
 void ChromiumCDMProxy::Shutdown() {
   MOZ_ASSERT(NS_IsMainThread());
-  EME_LOG("ChromiumCDMProxy::Shutdown(this=%p)", this);
+  EME_LOG("ChromiumCDMProxy::Shutdown(this=%p) mCDM=%p", this, mCDM.get());
   mKeys.Clear();
   RefPtr<gmp::ChromiumCDMParent> cdm;
   {
     MutexAutoLock lock(mCDMMutex);
     cdm.swap(mCDM);
   }
   if (cdm) {
     // We need to keep this proxy alive until the parent has finished its