Index: cc/trees/layer_tree_host_impl.cc |
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc |
index 8a4bba0fed034f11756981f6a1e532929178bac7..39106ffbbbcbb0f316a30c52b903ff3a4fa3cf2d 100644 |
--- a/cc/trees/layer_tree_host_impl.cc |
+++ b/cc/trees/layer_tree_host_impl.cc |
@@ -1613,7 +1613,9 @@ bool LayerTreeHostImpl::CanUseGpuRasterization() { |
ContextProvider* context_provider = |
output_surface_->worker_context_provider(); |
- base::AutoLock context_lock(*context_provider->GetLock()); |
+ ContextProvider::ScopedContextLock scoped_context(context_provider); |
+ if (context_provider->HasBeenDestroyed()) |
+ return false; |
if (!context_provider->GrContext()) |
return false; |