Index: content/common/gpu/client/command_buffer_proxy_impl.cc |
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc |
index 53ce2d7ee543787639fe8e1d0d14af7e50d20764..374a2584abbceca18fb873ccda2817d3bd3d2ecb 100644 |
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc |
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc |
@@ -45,10 +45,17 @@ CommandBufferProxyImpl::~CommandBufferProxyImpl() { |
FOR_EACH_OBSERVER(DeletionObserver, |
deletion_observers_, |
OnWillDeleteImpl()); |
- if (channel_) { |
- channel_->DestroyCommandBuffer(this); |
- channel_ = nullptr; |
- } |
+ Destroy(); |
+} |
+ |
+void CommandBufferProxyImpl::Destroy() { |
piman
2015/09/09 19:14:22
The lock needs to be held here. Should this CheckL
|
+ if (!channel_) |
+ return; |
+ |
+ channel_->DestroyCommandBuffer(this); |
Ken Russell (switch to Gerrit)
2015/09/09 06:09:11
Doesn't DestroyCommandBuffer need to be called on
reveman
2015/09/09 13:45:23
Correct. ::Destroy has the same thread usage restr
|
+ channel_ = nullptr; |
+ last_state_.error = gpu::error::kLostContext; |
piman
2015/09/09 19:14:22
If we lose the context, we have to lose all contex
|
+ last_state_.context_lost_reason = gpu::error::kGpuChannelLost; |
} |
bool CommandBufferProxyImpl::OnMessageReceived(const IPC::Message& message) { |