Bug 1540136 - P1: Log more info in ChromiumCDMProxy dtor and Shutdown. r=cpearce a=lizzard
authorBryce Van Dyk <bvandyk@mozilla.com>
Tue, 09 Apr 2019 15:05:01 +0000
changeset 523222 40fb1ced2598f5f2372a29819baaab5c5aab8208
parent 523221 7a0993f0f4fb8df971dfb8caa291c31f06707443
child 523223 48e7d2342ffa2f1bc57853dcd0c3a8e4ca838c42
push id11107
push userarchaeopteryx@coole-files.de
push dateThu, 18 Apr 2019 15:56:49 +0000
treeherdermozilla-beta@f764410a3326 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscpearce, lizzard
bugs1540136
milestone67.0
Bug 1540136 - P1: Log more info in ChromiumCDMProxy dtor and Shutdown. r=cpearce a=lizzard 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));
 
@@ -299,17 +300,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