diff --git a/gfx/layers/opengl/TextureHostOGL.cpp b/gfx/layers/opengl/TextureHostOGL.cpp index b590319715e6..ad2c022bd123 100644 --- a/gfx/layers/opengl/TextureHostOGL.cpp +++ b/gfx/layers/opengl/TextureHostOGL.cpp @@ -266,12 +266,15 @@ TextureHostOGL::WaitAcquireFenceSyncComplete() return; } + // Wait sync complete with timeout. + // If a source of the fence becomes invalid because of error, + // fene complete is not signaled. See Bug 1061435. EGLint status = sEGLLibrary.fClientWaitSync(EGL_DISPLAY(), sync, 0, - LOCAL_EGL_FOREVER); + 400000000 /*400 usec*/); if (status != LOCAL_EGL_CONDITION_SATISFIED) { - NS_WARNING("failed to wait native fence sync"); + NS_ERROR("failed to wait native fence sync"); } MOZ_ALWAYS_TRUE( sEGLLibrary.fDestroySync(EGL_DISPLAY(), sync) ); mAcquireFence = nullptr;