Commit d93ee216 authored by Antoine Labour's avatar Antoine Labour Committed by Commit Bot

Correctly set up the context lock in ui::InProcessContextProvider

ContextCacheController needs the context lock, but was not set up in
ui::InProcessContextProvider, causing data races.

Bug: 845173
Change-Id: Ia9e3ae509efd2aa880f80fde55d92bd835db32b9
Reviewed-on: https://chromium-review.googlesource.com/1067537Reviewed-by: default avatarVictor Miura <vmiura@chromium.org>
Commit-Queue: Antoine Labour <piman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#560358}
parent 0979d604
...@@ -109,6 +109,8 @@ gpu::ContextResult InProcessContextProvider::BindToCurrentThread() { ...@@ -109,6 +109,8 @@ gpu::ContextResult InProcessContextProvider::BindToCurrentThread() {
cache_controller_ = std::make_unique<viz::ContextCacheController>( cache_controller_ = std::make_unique<viz::ContextCacheController>(
context_->GetImplementation(), base::ThreadTaskRunnerHandle::Get()); context_->GetImplementation(), base::ThreadTaskRunnerHandle::Get());
if (support_locking_)
cache_controller_->SetLock(GetLock());
std::string unique_context_name = std::string unique_context_name =
base::StringPrintf("%s-%p", debug_name_.c_str(), context_.get()); base::StringPrintf("%s-%p", debug_name_.c_str(), context_.get());
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment