Bug 1215265. Add some missing MOZ_COUNT_CTOR/DTORs. r=nical
☠☠ backed out by 564f5491ccdd ☠ ☠
authorRobert O'Callahan <robert@ocallahan.org>
Wed, 18 Nov 2015 17:30:54 +1300
changeset 273666 0cbe4b80d443dd21899a600b7a9e0e8449ccdc4c
parent 273665 7b113a6167e94e97645286e7431b98d17bc2610c
child 273667 162ded2e49c8bbecc48c8943faa36506b297d34e
push id68353
push userrocallahan@mozilla.com
push dateMon, 23 Nov 2015 04:12:17 +0000
treeherdermozilla-inbound@162ded2e49c8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnical
bugs1215265
milestone45.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 1215265. Add some missing MOZ_COUNT_CTOR/DTORs. r=nical
gfx/layers/ipc/ImageBridgeChild.cpp
gfx/layers/ipc/ImageBridgeParent.cpp
gfx/layers/ipc/ShadowLayers.cpp
--- a/gfx/layers/ipc/ImageBridgeChild.cpp
+++ b/gfx/layers/ipc/ImageBridgeChild.cpp
@@ -257,28 +257,32 @@ static void ConnectImageBridge(ImageBrid
   MessageLoop *parentMsgLoop = parent->GetMessageLoop();
   ipc::MessageChannel *parentChannel = parent->GetIPCChannel();
   child->Open(parentChannel, parentMsgLoop, mozilla::ipc::ChildSide);
 }
 
 ImageBridgeChild::ImageBridgeChild()
   : mShuttingDown(false)
 {
+  MOZ_COUNT_CTOR(ImageBridgeChild);
+
   MOZ_ASSERT(NS_IsMainThread());
 
   // Always run destructor on the main thread
   SetMessageLoopToPostDestructionTo(MessageLoop::current());
 
   mTxn = new CompositableTransaction();
 }
 ImageBridgeChild::~ImageBridgeChild()
 {
   MOZ_ASSERT(NS_IsMainThread());
 
   delete mTxn;
+
+  MOZ_COUNT_DTOR(ImageBridgeChild);
 }
 
 void
 ImageBridgeChild::MarkShutDown()
 {
   MOZ_ASSERT(!mShuttingDown);
   mShuttingDown = true;
 }
--- a/gfx/layers/ipc/ImageBridgeParent.cpp
+++ b/gfx/layers/ipc/ImageBridgeParent.cpp
@@ -55,16 +55,18 @@ CompositorThreadHolder* GetCompositorThr
 ImageBridgeParent::ImageBridgeParent(MessageLoop* aLoop,
                                      Transport* aTransport,
                                      ProcessId aChildProcessId)
   : mMessageLoop(aLoop)
   , mTransport(aTransport)
   , mSetChildThreadPriority(false)
   , mStopped(false)
 {
+  MOZ_COUNT_CTOR(ImageBridgeParent);
+
   MOZ_ASSERT(NS_IsMainThread());
   sMainLoop = MessageLoop::current();
 
   // top-level actors must be destroyed on the main thread.
   SetMessageLoopToPostDestructionTo(sMainLoop);
 
   // creates the map only if it has not been created already, so it is safe
   // with several bridges
@@ -85,16 +87,18 @@ ImageBridgeParent::~ImageBridgeParent()
 
   nsTArray<PImageContainerParent*> parents;
   ManagedPImageContainerParent(parents);
   for (PImageContainerParent* p : parents) {
     delete p;
   }
 
   sImageBridges.erase(OtherPid());
+
+  MOZ_COUNT_DTOR(ImageBridgeParent);
 }
 
 void
 ImageBridgeParent::ActorDestroy(ActorDestroyReason aWhy)
 {
   MessageLoop::current()->PostTask(
     FROM_HERE,
     NewRunnableMethod(this, &ImageBridgeParent::DeferredDestroy));
--- a/gfx/layers/ipc/ShadowLayers.cpp
+++ b/gfx/layers/ipc/ShadowLayers.cpp
@@ -164,27 +164,31 @@ CompositableForwarder::IdentifyTextureHo
 }
 
 ShadowLayerForwarder::ShadowLayerForwarder()
  : mDiagnosticTypes(DiagnosticTypes::NO_DIAGNOSTIC)
  , mIsFirstPaint(false)
  , mWindowOverlayChanged(false)
  , mPaintSyncId(0)
 {
+  MOZ_COUNT_CTOR(ShadowLayerForwarder);
+
   mTxn = new Transaction();
 }
 
 ShadowLayerForwarder::~ShadowLayerForwarder()
 {
   MOZ_ASSERT(mTxn->Finished(), "unfinished transaction?");
   delete mTxn;
   if (mShadowManager) {
     mShadowManager->SetForwarder(nullptr);
     mShadowManager->Destroy();
   }
+
+  MOZ_COUNT_DTOR(ShadowLayerForwarder);
 }
 
 void
 ShadowLayerForwarder::BeginTransaction(const gfx::IntRect& aTargetBounds,
                                        ScreenRotation aRotation,
                                        dom::ScreenOrientationInternal aOrientation)
 {
   MOZ_ASSERT(HasShadowManager(), "no manager to forward to");