Bug 1273314 - Fix VideoFrameContainer logging. r?jesup draft
authorAndreas Pehrson <pehrsons@gmail.com>
Thu, 06 Oct 2016 11:37:47 +0200
changeset 421533 222fceefde5a03cc14c3a1078431919004de0460
parent 421532 0d575da6d16f3241f6fc648070fd52baacead6db
child 421534 50cb1fa9c51631f8feb3cf7a411b8ae852b46408
push id31542
push userbmo:pehrson@telenordigital.com
push dateThu, 06 Oct 2016 12:07:08 +0000
reviewersjesup
bugs1273314
milestone52.0a1
Bug 1273314 - Fix VideoFrameContainer logging. r?jesup MozReview-Commit-ID: KYHhy7yUHpK
dom/media/VideoFrameContainer.cpp
--- a/dom/media/VideoFrameContainer.cpp
+++ b/dom/media/VideoFrameContainer.cpp
@@ -9,33 +9,30 @@
 #include "mozilla/dom/HTMLMediaElement.h"
 #include "nsIFrame.h"
 #include "nsDisplayList.h"
 #include "nsSVGEffects.h"
 
 using namespace mozilla::layers;
 
 namespace mozilla {
-PRLogModuleInfo* gVideoFrameContainerLog;
+static LazyLogModule gVideoFrameContainerLog("VideoFrameContainer");
 #define CONTAINER_LOG(type, msg) MOZ_LOG(gVideoFrameContainerLog, type, msg)
 
 VideoFrameContainer::VideoFrameContainer(dom::HTMLMediaElement* aElement,
                                          already_AddRefed<ImageContainer> aContainer)
   : mElement(aElement),
     mImageContainer(aContainer), mMutex("nsVideoFrameContainer"),
     mBlackImage(nullptr),
     mFrameID(0),
     mIntrinsicSizeChanged(false), mImageSizeChanged(false),
     mPendingPrincipalHandle(PRINCIPAL_HANDLE_NONE), mFrameIDForPendingPrincipalHandle(0)
 {
   NS_ASSERTION(aElement, "aElement must not be null");
   NS_ASSERTION(mImageContainer, "aContainer must not be null");
-  if (!gVideoFrameContainerLog) {
-    gVideoFrameContainerLog = PR_NewLogModule("VideoFrameContainer");
-  }
 }
 
 VideoFrameContainer::~VideoFrameContainer()
 {}
 
 PrincipalHandle VideoFrameContainer::GetLastPrincipalHandle()
 {
   MutexAutoLock lock(mMutex);