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

Issue 170023002: Don't use nested message loop during EndSession (Closed)

Created:
6 years, 10 months ago by scottmg
Modified:
6 years, 10 months ago
CC:
chromium-reviews
Visibility:
Public.

Description

Don'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 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+18 lines, -38 lines) Patch
M chrome/browser/browser_process_impl.cc View 4 chunks +18 lines, -38 lines 0 comments Download

Messages

Total messages: 14 (0 generated)
scottmg
Seem reasonable? Any side-effects that you can think of? (esp since this'll probably be merged ...
6 years, 10 months ago (2014-02-18 20:15:30 UTC) #1
piman
I'm not really familiar with the reason we were trying to run a nested loop. ...
6 years, 10 months ago (2014-02-18 20:30:45 UTC) #2
cpu_(ooo_6.6-7.5)
nice. lgtm
6 years, 10 months ago (2014-02-18 21:42:09 UTC) #3
scottmg
+darin for chrome/ owners
6 years, 10 months ago (2014-02-18 21:46:29 UTC) #4
darin (slow to review)
OK, LGTM
6 years, 10 months ago (2014-02-18 22:30:29 UTC) #5
scottmg
The CQ bit was checked by scottmg@chromium.org
6 years, 10 months ago (2014-02-18 22:41:00 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/170023002/1
6 years, 10 months ago (2014-02-18 22:42:37 UTC) #7
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 10 months ago (2014-02-18 23:02:55 UTC) #8
commit-bot: I haz the power
Retried try job too often on win for step(s) compile http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=win&number=150915
6 years, 10 months ago (2014-02-18 23:02:55 UTC) #9
scottmg
The CQ bit was checked by scottmg@chromium.org
6 years, 10 months ago (2014-02-18 23:05:01 UTC) #10
scottmg
The CQ bit was unchecked by scottmg@chromium.org
6 years, 10 months ago (2014-02-18 23:05:06 UTC) #11
scottmg
The CQ bit was checked by scottmg@chromium.org
6 years, 10 months ago (2014-02-18 23:06:28 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/scottmg@chromium.org/170023002/1
6 years, 10 months ago (2014-02-18 23:08:37 UTC) #13
commit-bot: I haz the power
6 years, 10 months ago (2014-02-19 02:06:41 UTC) #14
Message was sent while issue was closed.
Change committed as 251922

Powered by Google App Engine
This is Rietveld 408576698