FYI : Termination of chrome before end of main() on all platforms

34 views
Skip to first unread message

Gabriel Charette

unread,
Jan 15, 2018, 7:37:04 AM1/15/18
to Chromium-dev
FYI, https://chromium-review.googlesource.com/c/chromium/src/+/860617 just landed and Chrome should now be terminating itself before the end of main().

This avoids subtle static uninitialization issues.

Please let me know if this causes any issues.

We would like to move this termination even sooner : https://crbug.com/800808.

PS: I would have like to do this in //content for all embedders to benefit but I couldn't since test frameworks hook ContentMain() and wouldn't be happy with process termination.

Cheers!
Gab

Daniel Cheng

unread,
Jan 15, 2018, 6:50:51 PM1/15/18
to g...@chromium.org, Chromium-dev
On Mon, Jan 15, 2018 at 4:36 AM Gabriel Charette <g...@chromium.org> wrote:
FYI, https://chromium-review.googlesource.com/c/chromium/src/+/860617 just landed and Chrome should now be terminating itself before the end of main().

This avoids subtle static uninitialization issues.

Shouldn't we be trying to get rid of static destructors anyway, even without this change?

Daniel
 

Please let me know if this causes any issues.

We would like to move this termination even sooner : https://crbug.com/800808.

PS: I would have like to do this in //content for all embedders to benefit but I couldn't since test frameworks hook ContentMain() and wouldn't be happy with process termination.

Cheers!
Gab

--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev
---
You received this message because you are subscribed to the Google Groups "Chromium-dev" group.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/chromium-dev/CAJTZ7LLOeYGiv-xSUZ6TtkRbgYGU2niU0gzOyv2tHMPMKVczPA%40mail.gmail.com.

Peter Kasting

unread,
Jan 15, 2018, 7:39:53 PM1/15/18
to Daniel Cheng, Gabriel Charette, Chromium-dev
On Mon, Jan 15, 2018 at 3:49 PM, Daniel Cheng <dch...@chromium.org> wrote:
On Mon, Jan 15, 2018 at 4:36 AM Gabriel Charette <g...@chromium.org> wrote:
FYI, https://chromium-review.googlesource.com/c/chromium/src/+/860617 just landed and Chrome should now be terminating itself before the end of main().

This avoids subtle static uninitialization issues.

Shouldn't we be trying to get rid of static destructors anyway, even without this change?

Yes (and the bug and other discussion threads on this agree).

PK 

Gabriel Charette

unread,
Jan 16, 2018, 2:36:08 AM1/16/18
to Peter Kasting, Chromium-dev, Daniel Cheng, Gabriel Charette
Yes of course, I'm all for both flags, just saying I'm less worried about the latter.


PK 

Gabriel Charette

unread,
Jan 16, 2018, 8:17:56 AM1/16/18
to Gabriel Charette, Peter Kasting, Chromium-dev, Daniel Cheng
Sorry thought I was replying to the other thread...

I agree that we should get rid of static uninitializers as much as possible in the first place. This change (to atomically exit at the end of main()) goes beyond that however. It is step#1 in a bigger plan to atomically TaskScheduler::Shutdown() then terminate process (much earlier than today).
 


PK 
Reply all
Reply to author
Forward
0 new messages