File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
CefSharp.BrowserSubprocess.Core Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -120,8 +120,25 @@ namespace CefSharp
120120
121121 // The Crashpad Handler doesn't have any HostProcessIdArgument, so we must not try to
122122 // parse it lest we want an ArgumentNullException.
123- if (type ! = " crashpad-handler" )
123+ if (type = = " crashpad-handler" )
124124 {
125+ // Lower the shutdown priority so the browser process is shutdown first (Issue #3155)
126+ // The system terminates the process without displaying a retry dialog box for the user.
127+ // Crashpad is lower than other sub processes so it can still monitor process exit crashes.
128+ if (!SetProcessShutdownParameters (0x100 , SHUTDOWN_NORETRY))
129+ {
130+ LOG (ERROR) << " SetProcessShutdownParameters - Crashpad" ;
131+ }
132+ }
133+ else
134+ {
135+ // Lower the shutdown priority so the browser process is shutdown first (Issue #3155)
136+ // The system terminates the process without displaying a retry dialog box for the user.
137+ if (!SetProcessShutdownParameters (0x280 - 100 , SHUTDOWN_NORETRY))
138+ {
139+ LOG (ERROR) << " SetProcessShutdownParameters - Sub Process" ;
140+ }
141+
125142 parentProcessId = int::Parse (CommandLineArgsParser::GetArgumentValue (args, CefSharpArguments::HostProcessIdArgument));
126143 if (CommandLineArgsParser::HasArgument (args, CefSharpArguments::ExitIfParentProcessClosed))
127144 {
You can’t perform that action at this time.
0 commit comments