Commit 2e03149c authored by Andrew Osmond's avatar Andrew Osmond
Browse files

Backed out changeset d84ea38d6fd0 (bug 1399453) because the annotations are no longer needed.

parent 81492289
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -28,7 +28,7 @@ VsyncBridgeParent::VsyncBridgeParent()
 : mOpen(false)
{
  MOZ_COUNT_CTOR(VsyncBridgeParent);
  mCompositorThreadRef = new CompositorThreadHolderDebug("VsyncBridge");
  mCompositorThreadRef = CompositorThreadHolder::GetSingleton();
}

VsyncBridgeParent::~VsyncBridgeParent()
+1 −1
Original line number Diff line number Diff line
@@ -38,7 +38,7 @@ private:

private:
  bool mOpen;
  RefPtr<layers::CompositorThreadHolderDebug> mCompositorThreadRef;
  RefPtr<layers::CompositorThreadHolder> mCompositorThreadRef;
};

} // namespace gfx
+1 −4
Original line number Diff line number Diff line
@@ -42,8 +42,6 @@ CompositorManagerParent::CreateSameProcess()
  // process case because if we open from the child perspective, we can do it
  // on the main thread and complete before we return the manager handles.
  RefPtr<CompositorManagerParent> parent = new CompositorManagerParent();
  parent->mCompositorThreadHolder =
    new CompositorThreadHolderDebug("CompositorManagerSame");
  parent->SetOtherProcessId(base::GetCurrentProcId());
  return parent.forget();
}
@@ -58,8 +56,6 @@ CompositorManagerParent::Create(Endpoint<PCompositorManagerParent>&& aEndpoint)
  MOZ_ASSERT(aEndpoint.OtherPid() != base::GetCurrentProcId());

  RefPtr<CompositorManagerParent> bridge = new CompositorManagerParent();
  bridge->mCompositorThreadHolder =
    new CompositorThreadHolderDebug("CompositorManagerContent");

  RefPtr<Runnable> runnable = NewRunnableMethod<Endpoint<PCompositorManagerParent>&&>(
    "CompositorManagerParent::Bind",
@@ -110,6 +106,7 @@ CompositorManagerParent::CreateSameProcessWidgetCompositorBridge(CSSToLayoutDevi
}

CompositorManagerParent::CompositorManagerParent()
  : mCompositorThreadHolder(CompositorThreadHolder::GetSingleton())
{
}

+2 −2
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ namespace mozilla {
namespace layers {

class CompositorBridgeParent;
class CompositorThreadHolderDebug;
class CompositorThreadHolder;

#ifndef DEBUG
#define COMPOSITOR_MANAGER_PARENT_EXPLICIT_SHUTDOWN
@@ -68,7 +68,7 @@ private:

  void DeferredDestroy();

  RefPtr<CompositorThreadHolderDebug> mCompositorThreadHolder;
  RefPtr<CompositorThreadHolder> mCompositorThreadHolder;

  AutoTArray<RefPtr<CompositorBridgeParent>, 1> mPendingCompositorBridges;
};
+0 −30
Original line number Diff line number Diff line
@@ -10,9 +10,6 @@
#include "mozilla/layers/ImageBridgeParent.h"
#include "mozilla/layers/SharedSurfacesParent.h"
#include "mozilla/media/MediaSystemResourceService.h"
#ifdef MOZ_CRASHREPORTER
#include "nsExceptionHandler.h"     // for CrashReporter
#endif

namespace mozilla {

@@ -23,33 +20,6 @@ void ReleaseVRManagerParentSingleton();

namespace layers {

#ifdef MOZ_CRASHREPORTER
static Atomic<int32_t> sHoldersNextId(0);
#endif

CompositorThreadHolderDebug::CompositorThreadHolderDebug(const char* aName)
  : mHolder(CompositorThreadHolder::GetSingleton())
{
#ifdef MOZ_CRASHREPORTER
  if (XRE_IsParentProcess()) {
    mId.AppendLiteral("gfxCTH:");
    mId.Append(aName);
    mId.AppendLiteral(":");
    mId.AppendInt(++sHoldersNextId);
    CrashReporter::AnnotateCrashReport(mId, NS_LITERAL_CSTRING("1"));
  }
#endif
}

CompositorThreadHolderDebug::~CompositorThreadHolderDebug()
{
#ifdef MOZ_CRASHREPORTER
  if (XRE_IsParentProcess()) {
    CrashReporter::AnnotateCrashReport(mId, NS_LITERAL_CSTRING("0"));
  }
#endif
}

static StaticRefPtr<CompositorThreadHolder> sCompositorThreadHolder;
static bool sFinishedCompositorShutDown = false;

Loading