From 9a26757fbef2e81be092bdef2f9ea7f2829f78c2 Mon Sep 17 00:00:00 2001 From: "piman@chromium.org" Date: Wed, 3 Jul 2013 23:33:35 +0000 Subject: aura: fix race in TextureImageTransportSurface destruction BUG=254982 R=apatrick@chromium.org Review URL: https://codereview.chromium.org/18089010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@210069 0039d316-1c4b-4281-b951-d872f2087c98 --- content/common/gpu/texture_image_transport_surface.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'content/common') diff --git a/content/common/gpu/texture_image_transport_surface.cc b/content/common/gpu/texture_image_transport_surface.cc index 34b1d7a..2a7bada 100644 --- a/content/common/gpu/texture_image_transport_surface.cc +++ b/content/common/gpu/texture_image_transport_surface.cc @@ -295,6 +295,13 @@ void TextureImageTransportSurface::BufferPresentedImpl( const std::string& mailbox_name) { DCHECK(is_swap_buffers_pending_); is_swap_buffers_pending_ = false; + + // When we wait for a sync point, we may get called back after the stub is + // destroyed. In that case there's no need to do anything with the returned + // mailbox. + if (stub_destroyed_) + return; + // We should not have allowed the backbuffer to be discarded while the ack // was pending. DCHECK(backbuffer_suggested_allocation_); -- cgit v1.1