Bug 1254829 - Change global context to static RefPtr to avoid destruction during QuickExit(), r?jrmuizel
MozReview-Commit-ID: COV0vvyFubo
--- 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;
}