Fix GpuChannelHost destruction and races
GpuChannelHost::DestroyChannel but it introduced a new state to GpuChannelHost
which was not captured everywhere and had races.
1- Ensure GpuChannelHost::DestroyChannel is always called on the main thread, before destruction.
2- properly handle the channel_ == NULL state.
3- Fix races (channel_ is used on any thread on windows, must be locked)
Also make sure contexts are destroyed before the channel, for sanity.
Review URL: https://codereview.chromium.org/1128233004
4 files changed