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 Review URL: https://chromiumcodereview.appspot.com/10837104 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@149976 0039d316-1c4b-4281-b951-d872f2087c98
Showing
Please register or sign in to comment