Bug 922810 - Fix the build on compilers not supporting strong enums - r=jgilbert
authorBenoit Jacob <bjacob@mozilla.com>
Fri, 11 Oct 2013 09:16:43 -0400
changeset 164277 363383856ae57c2056af1d5924c839e8d7ea3d7d
parent 164276 54dd7819cbde7d8f8e18bf0ea87c1b01dbcc53ca
child 164278 c4693dd2e89746c2dde298f9c322bb770dde390c
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgilbert
bugs922810
milestone27.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 922810 - Fix the build on compilers not supporting strong enums - r=jgilbert
content/canvas/src/WebGLContextGL.cpp
--- a/content/canvas/src/WebGLContextGL.cpp
+++ b/content/canvas/src/WebGLContextGL.cpp
@@ -251,24 +251,24 @@ WebGLContext::BindTexture(GLenum target,
     if (target == LOCAL_GL_TEXTURE_2D) {
         currentTexPtr = &mBound2DTextures[mActiveTexture];
     } else if (target == LOCAL_GL_TEXTURE_CUBE_MAP) {
         currentTexPtr = &mBoundCubeMapTextures[mActiveTexture];
     } else {
         return ErrorInvalidEnumInfo("bindTexture: target", target);
     }
 
-    WebGLTextureFakeBlackStatus currentTexFakeBlackStatus
-        = (*currentTexPtr)
-          ? (*currentTexPtr)->ResolvedFakeBlackStatus()
-          : WebGLTextureFakeBlackStatus::NotNeeded;
-    WebGLTextureFakeBlackStatus newTexFakeBlackStatus
-        = newTex
-          ? newTex->ResolvedFakeBlackStatus()
-          : WebGLTextureFakeBlackStatus::NotNeeded;
+    WebGLTextureFakeBlackStatus currentTexFakeBlackStatus = WebGLTextureFakeBlackStatus::NotNeeded;
+    if (*currentTexPtr) {
+        currentTexFakeBlackStatus = (*currentTexPtr)->ResolvedFakeBlackStatus();
+    }
+    WebGLTextureFakeBlackStatus newTexFakeBlackStatus = WebGLTextureFakeBlackStatus::NotNeeded;
+    if (newTex) {
+        newTexFakeBlackStatus = newTex->ResolvedFakeBlackStatus();
+    }
 
     *currentTexPtr = newTex;
 
     if (currentTexFakeBlackStatus != newTexFakeBlackStatus) {
         SetFakeBlackStatus(WebGLContextFakeBlackStatus::Unknown);
     }
 
     MakeContextCurrent();