Bug 1127405 - Remove the ForceRemove in CanvasClientSharedSurface to prevent crash. r=nical

This commit is contained in:
Ethan Lin 2015-02-03 18:15:00 +01:00
parent 5b8f79fc23
commit 83c3bcea0a

View File

@ -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;