gpu: Invalidate channel map first to fix reentracy issues

Clearing the channel map in DestroyAllChannels can re-enter into
GpuChannelManager via LoseAllContexts from ~GpuChannel causing a
use-after-free crash.

Bug: 942954
Change-Id: Iaf5f64ec3f96f2b5948cd6080c701c1107bd5b2c
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1529342
Auto-Submit: Sunny Sachanandani <sunnyps@chromium.org>
Reviewed-by: Antoine Labour <piman@chromium.org>
Commit-Queue: Sunny Sachanandani <sunnyps@chromium.org>
Cr-Commit-Position: refs/heads/master@{#642138}
1 file changed