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 88446 9d1489e6521818c8dfe75fd894d97bd215e80af8
parent 88445 a708e1611e60ee3e0a95b0c8b9feb5632edb3311
child 88447 4dd463134071c9de38fc4f5b32e6a4d267ae4f1d
push id157
push userMs2ger@gmail.com
push dateWed, 07 Mar 2012 19:27:10 +0000
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()) {