Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(683)

Issue 10837104: Fix channel lost race in GpuChannelHost (Closed)

Created:
8 years, 4 months ago by piman
Modified:
8 years, 4 months ago
Reviewers:
apatrick_chromium
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam, apatrick_chromium
Visibility:
Public.

Description

Fix channel lost race in GpuChannelHost The problem this fixes is, depending on the exact timing, a context would receive a lost context callback (task 1), and would then post a task to recreate the context (task 2). In parallel a task would be posted to signal the GpuChannelHost that the channel is lost (task 3). Because task 3 is posted from the IO thread, whereas task 2 is posted from another thread (but they both are posted to the "main" thread), the race in posting results in a race in execution, and task 2 may try to recreate a context using a channel that doesn't know yet that it's non-functional, resulting in failing to send the message and failing to create the context. This patch changes the post order - task 3 is posted before task 1 - ensuring task 2 is posted after task 3 (since task 2 is posted after task 1 executes). BUG=129067 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149976

Patch Set 1 #

Patch Set 2 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -4 lines) Patch
M content/common/gpu/client/gpu_channel_host.cc View 2 chunks +7 lines, -4 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
piman
8 years, 4 months ago (2012-08-03 20:59:58 UTC) #1
apatrick_chromium
lgtm
8 years, 4 months ago (2012-08-03 21:06:51 UTC) #2
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/10837104/1
8 years, 4 months ago (2012-08-03 21:09:37 UTC) #3
commit-bot: I haz the power
Try job failure for 10837104-1 (retry) on win for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-03 21:33:58 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/10837104/10002
8 years, 4 months ago (2012-08-03 21:56:07 UTC) #5
commit-bot: I haz the power
Try job failure for 10837104-10002 (retry) on win_rel for step "compile" (clobber build). It's a ...
8 years, 4 months ago (2012-08-03 22:19:51 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/piman@chromium.org/10837104/10002
8 years, 4 months ago (2012-08-03 22:26:51 UTC) #7
commit-bot: I haz the power
8 years, 4 months ago (2012-08-03 23:50:53 UTC) #8
Change committed as 149976

Powered by Google App Engine
This is Rietveld 408576698