DescriptionDon't use nested message loop during EndSession
Previously during EndSession, a nested message loop and a task posted to
the FILE thread that posted a MessageLoop::Quit were used to communicate
that the FILE thread had completed outstanding writes. However, during
shutdown the GPU process might be terminated before the browser has run
through this code. In that case, the GPU process host might process the
"lost context" and try to re-establish (synchronously) a connection with
the GPU process. In this case, Windows can deny the launch of the gpu
process because the window station is terminating. This results in a
browser hang waiting for the GPU, which turns into a crash when the
watchdog timer kills the browser.
To avoid all this, use the same mechanism as Linux -- create a waitable
event and simply have the FILE thread signal it (meaning it's completed
previous writes). By not re-entering a UI-thread message loop, we avoid
having the GPU process host messages get processed.
As a side-benefit, this also means that GPU paint messages are not
processed, which (I think) will avoid the ugliness of sometimes having
sad tabs rendered during shutdown. This could happen because the
renderers are also asynchronously killed during shutdown and so it's a
race between painting the next frame and the browser window being
closed.
R=piman@chromium.org, cpu@chromium.org, darin@chromium.org
BUG=318527, 47908, 142501
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=251922
Patch Set 1 #
Messages
Total messages: 14 (0 generated)
|