Index: content/browser/compositor/gpu_process_transport_factory.cc |
diff --git a/content/browser/compositor/gpu_process_transport_factory.cc b/content/browser/compositor/gpu_process_transport_factory.cc |
index 4c0b3630df7eaa3c2565da02b28c9161b2467e5a..1dc681a858a633204b9f571cc16db9217055d7b2 100644 |
--- a/content/browser/compositor/gpu_process_transport_factory.cc |
+++ b/content/browser/compositor/gpu_process_transport_factory.cc |
@@ -245,8 +245,10 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( |
if (shared_worker_context_provider_) { |
base::AutoLock lock(*shared_worker_context_provider_->GetLock()); |
if (shared_worker_context_provider_->ContextGL() |
- ->GetGraphicsResetStatusKHR() != GL_NO_ERROR) |
+ ->GetGraphicsResetStatusKHR() != GL_NO_ERROR) { |
+ shared_worker_context_provider_->Destroy(); |
shared_worker_context_provider_ = nullptr; |
+ } |
} |
scoped_refptr<GpuChannelHost> gpu_channel_host = |
BrowserGpuChannelHostFactory::instance()->GetGpuChannel(); |
@@ -265,6 +267,8 @@ void GpuProcessTransportFactory::EstablishedGpuChannel( |
if (shared_worker_context_provider_ && |
!shared_worker_context_provider_->BindToCurrentThread()) |
shared_worker_context_provider_ = nullptr; |
+ if (shared_worker_context_provider_) |
+ shared_worker_context_provider_->SetupLock(); |
} |
} |