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 96ec1b74f42c95c03ddd1c88caf017c0c1e23c71..4ed834195a45e08761f6164df073267425f7c09b 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(); |
} |
} |