Commit e6f9a089 authored by Jonathan Backer's avatar Jonathan Backer Committed by Commit Bot

Fix race storing error on context lost

Bug: 905511
Change-Id: I1d37cb900749085384c6abcb2e0b9d8224f0a190
Reviewed-on: https://chromium-review.googlesource.com/c/1338160Reviewed-by: default avatarJonathan Backer <backer@chromium.org>
Reviewed-by: default avatarRobert Kroeger <rjkroege@chromium.org>
Commit-Queue: Jonathan Backer <backer@chromium.org>
Cr-Commit-Position: refs/heads/master@{#608463}
parent ff7402f2
......@@ -713,6 +713,13 @@ InProcessCommandBuffer::OnCommandBatchProcessed() {
void InProcessCommandBuffer::OnParseError() {
DCHECK_CALLED_ON_VALID_SEQUENCE(gpu_sequence_checker_);
// There is a race between service side FlushOnGpuThread() calling
// UpdateLastStateOnGpuThread() and client side calling GetLastState().
// Update last_state_ now before notifying client side to save the
// error and make the race benign.
UpdateLastStateOnGpuThread();
PostOrRunClientCallback(
base::BindOnce(&InProcessCommandBuffer::OnContextLost,
client_thread_weak_ptr_factory_.GetWeakPtr()));
......
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