Index: content/common/gpu/client/context_provider_command_buffer.cc |
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc |
index cb827258a5fdf8c271bc0d3eb73874d9a5bc7fe4..f6b882a30f5d8cd11c13ec076618e661febc8d25 100644 |
--- a/content/common/gpu/client/context_provider_command_buffer.cc |
+++ b/content/common/gpu/client/context_provider_command_buffer.cc |
@@ -185,6 +185,8 @@ void ContextProviderCommandBuffer::DeleteCachedResources() { |
} |
void ContextProviderCommandBuffer::OnLostContext() { |
+ base::AutoLock lock(context_lock_); |
+ |
DCHECK(context_thread_checker_.CalledOnValidThread()); |
{ |
base::AutoLock lock(main_thread_lock_); |
@@ -200,6 +202,8 @@ void ContextProviderCommandBuffer::OnLostContext() { |
void ContextProviderCommandBuffer::OnMemoryAllocationChanged( |
const gpu::MemoryAllocation& allocation) { |
+ base::AutoLock lock(context_lock_); |
+ |
DCHECK(context_thread_checker_.CalledOnValidThread()); |
if (memory_policy_changed_callback_.is_null()) |