From 83c3bcea0a83664b80e46f4db2a8c3714e8e1850 Mon Sep 17 00:00:00 2001 From: Ethan Lin Date: Tue, 3 Feb 2015 18:15:00 +0100 Subject: [PATCH] Bug 1127405 - Remove the ForceRemove in CanvasClientSharedSurface to prevent crash. r=nical --- gfx/layers/client/CanvasClient.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/gfx/layers/client/CanvasClient.cpp b/gfx/layers/client/CanvasClient.cpp index 9eb940a61b52..04df23dd2930 100644 --- a/gfx/layers/client/CanvasClient.cpp +++ b/gfx/layers/client/CanvasClient.cpp @@ -409,13 +409,7 @@ CanvasClientSharedSurface::Update(gfx::IntSize aSize, ClientCanvasLayer* aLayer) void CanvasClientSharedSurface::ClearSurfaces() { - if (mFrontTex && (mFront || mPrevFront)) { - // Force a synchronous destruction so that the TextureHost does not - // outlive the SharedSurface. This won't be needed once TextureClient/Host - // and SharedSurface are merged. - mFrontTex->ForceRemove(true /* sync */); - mFrontTex = nullptr; - } + mFrontTex = nullptr; // It is important to destroy the SharedSurface *after* the TextureClient. mFront = nullptr; mPrevFront = nullptr;