Bug 1267879 - Only check robustness if it's supported. - r=jrmuizel
authorJeff Gilbert <jgilbert@mozilla.com>
Fri, 10 Jun 2016 17:44:49 -0700
changeset 383235 b2272d35d5f8bf3b43d4adcfd4e9391d7037b37a
parent 383234 bba7d02cdb8c475d04f078ef004fd6e6fcfa7fcd
child 383236 b0383b45780133bdf8e84baa2e3d359854210511
push id21963
push userdmitchell@mozilla.com
push dateFri, 01 Jul 2016 19:54:18 +0000
reviewersjrmuizel
bugs1267879
milestone50.0a1
Bug 1267879 - Only check robustness if it's supported. - r=jrmuizel MozReview-Commit-ID: 4RNjnWFccID
gfx/gl/GLContext.cpp
--- a/gfx/gl/GLContext.cpp
+++ b/gfx/gl/GLContext.cpp
@@ -1111,40 +1111,42 @@ GLContext::LoadMoreSymbols(const char* p
                                                               const SymLoadStruct* extList,
                                                               GLFeature feature)
     {
         const bool useCore = this->IsFeatureProvidedByCoreSymbols(feature);
         const auto list = useCore ? coreList : extList;
         return fnLoadForFeature(list, feature);
     };
 
-    bool hasRobustness = false;
-    if (SupportsRobustness()) {
+    if (IsSupported(GLFeature::robustness)) {
+        bool hasRobustness = true;
+
         if (IsExtensionSupported(ARB_robustness)) {
             const SymLoadStruct symbols[] = {
                 { (PRFuncPtr*) &mSymbols.fGetGraphicsResetStatus, { "GetGraphicsResetStatusARB", nullptr } },
                 END_SYMBOLS
             };
-            if (fnLoadForExt(symbols, ARB_robustness)) {
-                hasRobustness = true;
+            if (!fnLoadForExt(symbols, ARB_robustness)) {
+                hasRobustness = false;
             }
         }
 
         if (!hasRobustness && IsExtensionSupported(EXT_robustness)) {
             const SymLoadStruct symbols[] = {
                 { (PRFuncPtr*) &mSymbols.fGetGraphicsResetStatus, { "GetGraphicsResetStatusEXT", nullptr } },
                 END_SYMBOLS
             };
-            if (fnLoadForExt(symbols, EXT_robustness)) {
-                hasRobustness = true;
+            if (!fnLoadForExt(symbols, EXT_robustness)) {
+                hasRobustness = false;
             }
         }
-    }
-    if (!hasRobustness) {
-        MarkUnsupported(GLFeature::robustness);
+
+        if (!hasRobustness) {
+            MarkUnsupported(GLFeature::robustness);
+        }
     }
 
     if (IsSupported(GLFeature::sync)) {
         const SymLoadStruct symbols[] = {
             { (PRFuncPtr*) &mSymbols.fFenceSync,      { "FenceSync",      nullptr } },
             { (PRFuncPtr*) &mSymbols.fIsSync,         { "IsSync",         nullptr } },
             { (PRFuncPtr*) &mSymbols.fDeleteSync,     { "DeleteSync",     nullptr } },
             { (PRFuncPtr*) &mSymbols.fClientWaitSync, { "ClientWaitSync", nullptr } },