mirror of
https://github.com/electron/electron.git
synced 2026-04-10 03:01:51 -04:00
fix: pass the exit code correctly in new PreMainMessageLoopRun
Refs: 2622e91c44
This commit is contained in:
@@ -227,7 +227,7 @@ bool ElectronBrowserMainParts::SetExitCode(int code) {
|
||||
}
|
||||
|
||||
int ElectronBrowserMainParts::GetExitCode() const {
|
||||
return exit_code_ ? *exit_code_ : 0;
|
||||
return exit_code_.value_or(content::RESULT_CODE_NORMAL_EXIT);
|
||||
}
|
||||
|
||||
int ElectronBrowserMainParts::PreEarlyInitialization() {
|
||||
@@ -240,7 +240,7 @@ int ElectronBrowserMainParts::PreEarlyInitialization() {
|
||||
HandleSIGCHLD();
|
||||
#endif
|
||||
|
||||
return content::RESULT_CODE_NORMAL_EXIT;
|
||||
return GetExitCode();
|
||||
}
|
||||
|
||||
void ElectronBrowserMainParts::PostEarlyInitialization() {
|
||||
@@ -473,7 +473,7 @@ int ElectronBrowserMainParts::PreMainMessageLoopRun() {
|
||||
// Notify observers that main thread message loop was initialized.
|
||||
Browser::Get()->PreMainMessageLoopRun();
|
||||
|
||||
return content::RESULT_CODE_NORMAL_EXIT;
|
||||
return GetExitCode();
|
||||
}
|
||||
|
||||
void ElectronBrowserMainParts::WillRunMainMessageLoop(
|
||||
|
||||
Reference in New Issue
Block a user