Bug 1064107 - "crash in RtlEnterCriticalSection | LockImpl::Lock()". r=bas a=sledru
authorNicolas Silva <nsilva@mozilla.com>
Thu, 09 Oct 2014 00:36:00 +0200
changeset 225693 00cf6dd17a10
parent 225692 9e9e53d15011
child 225694 7a12de89326b
child 225696 aa77bc7b59e3
push id3983
push usercbook@mozilla.com
push dateTue, 14 Oct 2014 13:05:53 +0000
treeherdermozilla-beta@00cf6dd17a10 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbas, sledru
bugs1064107
milestone34.0
Bug 1064107 - "crash in RtlEnterCriticalSection | LockImpl::Lock()". r=bas a=sledru
widget/xpwidgets/nsBaseWidget.cpp
--- a/widget/xpwidgets/nsBaseWidget.cpp
+++ b/widget/xpwidgets/nsBaseWidget.cpp
@@ -869,16 +869,19 @@ nsBaseWidget::GetPreferredCompositorBack
     aHints.AppendElement(LayersBackend::LAYERS_OPENGL);
   }
 
   aHints.AppendElement(LayersBackend::LAYERS_BASIC);
 }
 
 void nsBaseWidget::CreateCompositor(int aWidth, int aHeight)
 {
+  // This makes sure that gfxPlatforms gets initialized if it hasn't by now.
+  gfxPlatform::GetPlatform();
+
   MOZ_ASSERT(gfxPlatform::UsesOffMainThreadCompositing(),
              "This function assumes OMTC");
 
   // Recreating this is tricky, as we may still have an old and we need
   // to make sure it's properly destroyed by calling DestroyCompositor!
 
   // If we've already received a shutdown notification, don't try
   // create a new compositor.