Bug 1254829 - Change global context to static RefPtr to avoid destruction during QuickExit(). r=jrmuizel
☠☠ backed out by 99e7d6fbcbd9 ☠ ☠
authorPeter Chang <pchang@mozilla.com>
Fri, 01 Apr 2016 16:23:52 +0800
changeset 291242 b90dc48988d46ca3e26b097a1f7af05734626cb2
parent 291241 9e57ade27a044c83a5bd67ad88a823422ea7ae82
child 291243 3b7387f7b46b1b284b28f6e6083d8b7d2414e2ba
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjrmuizel
bugs1254829
milestone48.0a1
Bug 1254829 - Change global context to static RefPtr to avoid destruction during QuickExit(). r=jrmuizel MozReview-Commit-ID: COV0vvyFubo
gfx/gl/GLContextProviderWGL.cpp
--- a/gfx/gl/GLContextProviderWGL.cpp
+++ b/gfx/gl/GLContextProviderWGL.cpp
@@ -11,16 +11,17 @@
 #include "gfxPlatform.h"
 #include "gfxWindowsSurface.h"
 
 #include "gfxCrashReporterUtils.h"
 
 #include "prenv.h"
 
 #include "mozilla/Preferences.h"
+#include "mozilla/StaticPtr.h"
 
 namespace mozilla {
 namespace gl {
 
 using namespace mozilla::gfx;
 
 WGLLibrary sWGLLib;
 
@@ -682,17 +683,17 @@ GLContextProviderWGL::CreateOffscreen(co
         return nullptr;
 
     if (!gl->InitOffscreen(size, minCaps))
         return nullptr;
 
     return gl.forget();
 }
 
-static RefPtr<GLContextWGL> gGlobalContext;
+static StaticRefPtr<GLContextWGL> gGlobalContext;
 
 /*static*/ GLContext*
 GLContextProviderWGL::GetGlobalContext()
 {
     if (!sWGLLib.EnsureInitialized()) {
         return nullptr;
     }