Bug 1320994 - Unify MediaManager logging macros. r=jib
authorAndreas Pehrson <pehrsons@gmail.com>
Wed, 29 Mar 2017 12:06:49 +0200
changeset 356887 ebd5f2bb5c5948ae2348e62d3b71c018b0669934
parent 356886 2056ed360550bae11cd62974613ac49ab8cc64bf
child 356888 d34041d4dfe96a6872d2c4a569e0c428fa91a371
push id31775
push userihsiao@mozilla.com
push dateMon, 08 May 2017 03:10:38 +0000
treeherdermozilla-central@22aaf8bad4df [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjib
bugs1320994
milestone55.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 1320994 - Unify MediaManager logging macros. r=jib MozReview-Commit-ID: 14b6cXgOqP8
dom/media/MediaManager.cpp
dom/media/MediaManager.h
--- a/dom/media/MediaManager.cpp
+++ b/dom/media/MediaManager.cpp
@@ -1272,17 +1272,17 @@ public:
       }
 
       // Start() queued the tracks to be added synchronously to avoid races
       source->FinishAddTracks();
 
       source->SetPullEnabled(true);
       source->AdvanceKnownTracksTime(STREAM_TIME_MAX);
 
-      MM_LOG(("started all sources"));
+      LOG(("started all sources"));
 
       // Forward onTracksAvailableCallback to GetUserMediaNotificationEvent,
       // because onTracksAvailableCallback needs to be added to domStream
       // on the main thread.
       // The event runnable must always be released on mainthread due to the JS
       // callbacks in the TracksAvailableCallback.
       NS_DispatchToMainThread(do_AddRef(
         new GetUserMediaNotificationEvent(
@@ -3444,17 +3444,17 @@ SourceListener::Stop()
 void
 SourceListener::Remove()
 {
   MOZ_ASSERT(NS_IsMainThread());
   if (!mStream || mRemoved) {
     return;
   }
 
-  MM_LOG(("SourceListener removed on purpose, mFinished = %d", (int) mFinished));
+  LOG(("SourceListener removed on purpose, mFinished = %d", (int) mFinished));
   mRemoved = true; // RemoveListener is async, avoid races
   mWindowListener = nullptr;
 
   // If it's destroyed, don't call - listener will be removed and we'll be notified!
   if (!mStream->IsDestroyed()) {
     mStream->RemoveListener(this);
   }
 }
@@ -3657,17 +3657,17 @@ SourceListener::NotifyFinished()
   Stop(); // we know it's been activated
   mWindowListener->Remove(this);
 }
 
 void
 SourceListener::NotifyRemoved()
 {
   MOZ_ASSERT(NS_IsMainThread());
-  MM_LOG(("SourceListener removed, mFinished = %d", (int) mFinished));
+  LOG(("SourceListener removed, mFinished = %d", (int) mFinished));
   mRemoved = true;
 
   if (!mFinished) {
     NotifyFinished();
   }
 
   mWindowListener = nullptr;
 }
--- a/dom/media/MediaManager.h
+++ b/dom/media/MediaManager.h
@@ -55,19 +55,16 @@ namespace ipc {
 class PrincipalInfo;
 }
 
 class GetUserMediaTask;
 class GetUserMediaWindowListener;
 class MediaManager;
 class SourceListener;
 
-extern LogModule* GetMediaManagerLog();
-#define MM_LOG(msg) MOZ_LOG(GetMediaManagerLog(), mozilla::LogLevel::Debug, msg)
-
 class MediaDevice : public nsIMediaDevice
 {
 public:
   typedef MediaEngineSource Source;
 
   NS_DECL_THREADSAFE_ISUPPORTS
   NS_DECL_NSIMEDIADEVICE