Bug 1353668. P3 - rename CMLOG to LOG. r=kaku
authorJW Wang <jwwang@mozilla.com>
Wed, 05 Apr 2017 17:38:20 +0800
changeset 399553 f12dbd3fb4129bd18512b32d7b92757d67cbf4aa
parent 399552 52ab116906bfd11f4b69acd401a3f8b6ddecd543
child 399554 4f0fb27e739b8787e7326fe71d322b050973d05c
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskaku
bugs1353668
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 1353668. P3 - rename CMLOG to LOG. r=kaku MozReview-Commit-ID: 67dN3NEBCA7
dom/media/MediaResource.cpp
--- a/dom/media/MediaResource.cpp
+++ b/dom/media/MediaResource.cpp
@@ -29,19 +29,21 @@
 #include "nsContentUtils.h"
 #include "nsHostObjectProtocolHandler.h"
 #include <algorithm>
 #include "nsProxyRelease.h"
 #include "nsIContentPolicy.h"
 
 using mozilla::media::TimeUnit;
 
+#undef LOG
+
 mozilla::LazyLogModule gMediaResourceLog("MediaResource");
 // Debug logging macro with object pointer and class name.
-#define CMLOG(msg, ...) MOZ_LOG(gMediaResourceLog, mozilla::LogLevel::Debug, \
+#define LOG(msg, ...) MOZ_LOG(gMediaResourceLog, mozilla::LogLevel::Debug, \
   ("%p " msg, this, ##__VA_ARGS__))
 
 static const uint32_t HTTP_OK_CODE = 200;
 static const uint32_t HTTP_PARTIAL_RESPONSE_CODE = 206;
 
 namespace mozilla {
 
 void
@@ -354,18 +356,18 @@ ChannelMediaResource::ParseContentRangeH
   if (aRangeTotalText[0] == '*') {
     aRangeTotal = -1;
   } else {
     aRangeTotal = aRangeTotalText.ToInteger64(&rv);
     NS_ENSURE_TRUE(aRangeEnd < aRangeTotal, NS_ERROR_ILLEGAL_VALUE);
     NS_ENSURE_SUCCESS(rv, rv);
   }
 
-  CMLOG("Received bytes [%" PRId64 "] to [%" PRId64 "] of [%" PRId64 "] for decoder[%p]",
-        aRangeStart, aRangeEnd, aRangeTotal, mCallback.get());
+  LOG("Received bytes [%" PRId64 "] to [%" PRId64 "] of [%" PRId64 "] for decoder[%p]",
+      aRangeStart, aRangeEnd, aRangeTotal, mCallback.get());
 
   return NS_OK;
 }
 
 nsresult
 ChannelMediaResource::OnStopRequest(nsIRequest* aRequest, nsresult aStatus)
 {
   NS_ASSERTION(mChannel.get() == aRequest, "Wrong channel!");
@@ -427,19 +429,19 @@ nsresult
 ChannelMediaResource::CopySegmentToCache(nsIPrincipal* aPrincipal,
                                          const char* aFromSegment,
                                          uint32_t aCount,
                                          uint32_t* aWriteCount)
 {
   mCallback->NotifyDataArrived();
 
   // Keep track of where we're up to.
-  CMLOG("CopySegmentToCache at mOffset [%" PRId64 "] add "
-        "[%d] bytes for decoder[%p]",
-        mOffset, aCount, mCallback.get());
+  LOG("CopySegmentToCache at mOffset [%" PRId64 "] add "
+      "[%d] bytes for decoder[%p]",
+      mOffset, aCount, mCallback.get());
   mOffset += aCount;
   mCacheStream.NotifyDataReceived(aCount, aFromSegment, aPrincipal);
   *aWriteCount = aCount;
   return NS_OK;
 }
 
 
 struct CopySegmentClosure {
@@ -902,18 +904,18 @@ ChannelMediaResource::CacheClientNotifyS
   mCallback->NotifySuspendedStatusChanged();
 }
 
 nsresult
 ChannelMediaResource::CacheClientSeek(int64_t aOffset, bool aResume)
 {
   NS_ASSERTION(NS_IsMainThread(), "Don't call on non-main thread");
 
-  CMLOG("CacheClientSeek requested for aOffset [%" PRId64 "] for decoder [%p]",
-        aOffset, mCallback.get());
+  LOG("CacheClientSeek requested for aOffset [%" PRId64 "] for decoder [%p]",
+      aOffset, mCallback.get());
 
   CloseChannel();
 
   mOffset = aOffset;
 
   // Don't report close of the channel because the channel is not closed for
   // download ended, but for internal changes in the read position.
   mIgnoreClose = true;
@@ -1655,8 +1657,10 @@ MediaResourceIndex::Seek(int32_t aWhence
 
   mOffset = aOffset;
 
   return NS_OK;
 }
 
 } // namespace mozilla
 
+// avoid redefined macro in unified build
+#undef LOG