Merge pull request #7028 from electron/default-exit-code

Default app exit code to 0
This commit is contained in:
Cheng Zhao 2016-08-30 19:36:03 +09:00 committed by GitHub
commit e2d70fb92b
3 changed files with 8 additions and 5 deletions

View file

@ -48,7 +48,10 @@ void Browser::Quit() {
window_list->CloseAllWindows();
}
void Browser::Exit(int code) {
void Browser::Exit(mate::Arguments* args) {
int code = 0;
args->GetNext(&code);
if (!AtomBrowserMainParts::Get()->SetExitCode(code)) {
// Message loop is not ready, quit directly.
exit(code);

View file

@ -46,7 +46,7 @@ class Browser : public WindowListObserver {
void Quit();
// Exit the application immediately and set exit code.
void Exit(int code);
void Exit(mate::Arguments* args);
// Cleanup everything and shutdown the application gracefully.
void Shutdown();