Bug 716859 - Avoid jump crossing variable declaration (GCC bustage fix)
authorJacek Caban <jacek@codeweavers.com>
Tue, 26 Feb 2013 12:06:43 +0100
changeset 133409 b00914c9e7d4b0e224ef81c40ac336646b4b8a03
parent 133408 a936abbcf23fb8e694d42bf2d97775731499f9f7
child 133410 9198ac37724ba1d0ce61190e8ee841fe56147138
push id2452
push userlsblakk@mozilla.com
push dateMon, 13 May 2013 16:59:38 +0000
treeherdermozilla-beta@d4b152d29d8d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
bugs716859
milestone22.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 716859 - Avoid jump crossing variable declaration (GCC bustage fix)
gfx/gl/SharedSurfaceANGLE.cpp
--- a/gfx/gl/SharedSurfaceANGLE.cpp
+++ b/gfx/gl/SharedSurfaceANGLE.cpp
@@ -211,31 +211,32 @@ SharedSurface_ANGLEShareHandle::Create(G
     // Declare everything before 'goto's.
     HANDLE shareHandle = nullptr;
     nsRefPtr<ID3D10Texture2D> texture;
     nsRefPtr<ID3D10ShaderResourceView> srv;
 
     // On failure, goto CleanUpIfFailed.
     // If |failed|, CleanUpIfFailed will clean up and return null.
     bool failed = true;
+    HRESULT hr;
 
     // Off to the races!
     if (!egl->fQuerySurfacePointerANGLE(
             display,
             pbuffer,
             LOCAL_EGL_D3D_TEXTURE_2D_SHARE_HANDLE_ANGLE,
             &shareHandle))
     {
         NS_ERROR("Failed to grab ShareHandle for PBuffer!");
         goto CleanUpIfFailed;
     }
 
     // Ok, we have a valid PBuffer with ShareHandle.
     // Let's attach it to D3D.
-    HRESULT hr = d3d->OpenSharedResource(shareHandle,
+    hr = d3d->OpenSharedResource(shareHandle,
                                          __uuidof(ID3D10Texture2D),
                                          getter_AddRefs(texture));
     if (FAILED(hr))
         goto CleanUpIfFailed;
 
     hr = d3d->CreateShaderResourceView(texture, nullptr, getter_AddRefs(srv));
     if (FAILED(hr))
         goto CleanUpIfFailed;