Backed out changeset f296220f4117 (bug 1415762) for frequently crashing with mozilla::BlockingResourceBase::CheckAcquire(), RtlEnterCriticalSection and _pthread_mutex_lock.
authorRyan VanderMeulen <ryanvm@gmail.com>
Fri, 10 Nov 2017 16:06:34 -0500
changeset 444586 d32ac3e582b643d0938a3f094dd1b9d31dc8f065
parent 444585 9da355ba1fe3d3ff0662efa0d890728d8d704c0c
child 444587 092ccc6335a529133a8412a8f1bf1cdda872c6a9
push id1618
push userCallek@gmail.com
push dateThu, 11 Jan 2018 17:45:48 +0000
treeherdermozilla-release@882ca853e05a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs1415762
milestone58.0a1
backs outf296220f41172e899e585354439d37877aada199
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
Backed out changeset f296220f4117 (bug 1415762) for frequently crashing with mozilla::BlockingResourceBase::CheckAcquire(), RtlEnterCriticalSection and _pthread_mutex_lock.
gfx/layers/ipc/CompositorVsyncScheduler.cpp
gfx/vr/VRThread.h
--- a/gfx/layers/ipc/CompositorVsyncScheduler.cpp
+++ b/gfx/layers/ipc/CompositorVsyncScheduler.cpp
@@ -128,17 +128,16 @@ CompositorVsyncScheduler::PostCompositeT
     RefPtr<CancelableRunnable> task = NewCancelableRunnableMethod<TimeStamp>(
       "layers::CompositorVsyncScheduler::Composite",
       this,
       &CompositorVsyncScheduler::Composite,
       aCompositeTimestamp);
     mCurrentCompositeTask = task;
     ScheduleTask(task.forget(), 0);
   }
-  MonitorAutoLock lockVR(mCurrentVRListenerTaskMonitor);
   if (mCurrentVRListenerTask == nullptr && VRListenerThreadHolder::Loop()) {
     RefPtr<CancelableRunnable> task = NewCancelableRunnableMethod<TimeStamp>(
       "layers::CompositorVsyncScheduler::DispatchVREvents",
       this,
       &CompositorVsyncScheduler::DispatchVREvents,
       aCompositeTimestamp);
     mCurrentVRListenerTask = task;
     MOZ_ASSERT(VRListenerThreadHolder::Loop());
@@ -236,21 +235,16 @@ void
 CompositorVsyncScheduler::CancelCurrentCompositeTask()
 {
   MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread() || NS_IsMainThread());
   MonitorAutoLock lock(mCurrentCompositeTaskMonitor);
   if (mCurrentCompositeTask) {
     mCurrentCompositeTask->Cancel();
     mCurrentCompositeTask = nullptr;
   }
-  MonitorAutoLock lockVR(mCurrentVRListenerTaskMonitor);
-  if (mCurrentVRListenerTask) {
-    mCurrentVRListenerTask->Cancel();
-    mCurrentVRListenerTask = nullptr;
-  }
 }
 
 void
 CompositorVsyncScheduler::Composite(TimeStamp aVsyncTimestamp)
 {
   MOZ_ASSERT(CompositorThreadHolder::IsInCompositorThread());
   {
     MonitorAutoLock lock(mCurrentCompositeTaskMonitor);
--- a/gfx/vr/VRThread.h
+++ b/gfx/vr/VRThread.h
@@ -22,17 +22,17 @@ public:
 
   base::Thread* GetThread() const {
     return mThread;
   }
 
   static VRListenerThreadHolder* GetSingleton();
 
   static bool IsActive() {
-    return GetSingleton() && Loop();
+    return !!GetSingleton();
   }
 
   static void Start();
   static void Shutdown();
   static MessageLoop* Loop();
   static bool IsInVRListenerThread();
 
 private: