Bug 674753 - Ensure that sApitraceLibrary is static so that we only load the library once - r=bjacob
authorGeorge Wright <george@mozilla.com>
Sun, 04 Mar 2012 21:43:51 -0500
changeset 89761 9d1489e6521818c8dfe75fd894d97bd215e80af8
parent 89760 a708e1611e60ee3e0a95b0c8b9feb5632edb3311
child 89762 4dd463134071c9de38fc4f5b32e6a4d267ae4f1d
push id975
push userffxbld
push dateTue, 13 Mar 2012 21:39:16 +0000
treeherdermozilla-aurora@99faebf9dc36 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbjacob
bugs674753
milestone13.0a1
Bug 674753 - Ensure that sApitraceLibrary is static so that we only load the library once - r=bjacob
gfx/gl/GLContextProviderEGL.cpp
--- a/gfx/gl/GLContextProviderEGL.cpp
+++ b/gfx/gl/GLContextProviderEGL.cpp
@@ -231,17 +231,17 @@ static EGLint gContextAttribsRobustness[
     LOCAL_EGL_CONTEXT_CLIENT_VERSION, 2,
     //LOCAL_EGL_CONTEXT_ROBUST_ACCESS_EXT, LOCAL_EGL_TRUE,
     LOCAL_EGL_CONTEXT_RESET_NOTIFICATION_STRATEGY_EXT, LOCAL_EGL_LOSE_CONTEXT_ON_RESET_EXT,
     LOCAL_EGL_NONE
 };
 
 static PRLibrary* LoadApitraceLibrary()
 {
-    PRLibrary* sApitraceLibrary = NULL;
+    static PRLibrary* sApitraceLibrary = NULL;
 
     if (sApitraceLibrary)
         return sApitraceLibrary;
 
 #if defined(ANDROID)
     nsCString logFile = Preferences::GetCString("gfx.apitrace.logfile");
 
     if (logFile.IsEmpty()) {