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

Side by Side Diff: runtime/bin/main.cc

Issue 1428923003: Don't do clean shutdown on Process.exit() (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Exit isolate before exiting Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/bin/process.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 #include <string.h> 6 #include <string.h>
7 #include <stdio.h> 7 #include <stdio.h>
8 8
9 #include "include/dart_api.h" 9 #include "include/dart_api.h"
10 #include "include/dart_tools_api.h" 10 #include "include/dart_tools_api.h"
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
111 111
112 // Exit code indicating an API error. 112 // Exit code indicating an API error.
113 static const int kApiErrorExitCode = 253; 113 static const int kApiErrorExitCode = 253;
114 // Exit code indicating a compilation error. 114 // Exit code indicating a compilation error.
115 static const int kCompilationErrorExitCode = 254; 115 static const int kCompilationErrorExitCode = 254;
116 // Exit code indicating an unhandled error that is not a compilation error. 116 // Exit code indicating an unhandled error that is not a compilation error.
117 static const int kErrorExitCode = 255; 117 static const int kErrorExitCode = 255;
118 // Exit code indicating a vm restart request. Never returned to the user. 118 // Exit code indicating a vm restart request. Never returned to the user.
119 static const int kRestartRequestExitCode = 1000; 119 static const int kRestartRequestExitCode = 1000;
120 120
121 extern bool do_vm_shutdown; // Defined in bin/process.cc 121 // Global flag that is used to indicate that the VM should do a clean
122 // shutdown.
123 static bool do_vm_shutdown = false;
124
122 static void ErrorExit(int exit_code, const char* format, ...) { 125 static void ErrorExit(int exit_code, const char* format, ...) {
123 va_list arguments; 126 va_list arguments;
124 va_start(arguments, format); 127 va_start(arguments, format);
125 Log::VPrintErr(format, arguments); 128 Log::VPrintErr(format, arguments);
126 va_end(arguments); 129 va_end(arguments);
127 fflush(stderr); 130 fflush(stderr);
128 131
129 Dart_ExitScope(); 132 Dart_ExitScope();
130 Dart_ShutdownIsolate(); 133 Dart_ShutdownIsolate();
131 134
(...skipping 1384 matching lines...) Expand 10 before | Expand all | Expand 10 after
1516 Platform::Exit(Process::GlobalExitCode()); 1519 Platform::Exit(Process::GlobalExitCode());
1517 } 1520 }
1518 1521
1519 } // namespace bin 1522 } // namespace bin
1520 } // namespace dart 1523 } // namespace dart
1521 1524
1522 int main(int argc, char** argv) { 1525 int main(int argc, char** argv) {
1523 dart::bin::main(argc, argv); 1526 dart::bin::main(argc, argv);
1524 UNREACHABLE(); 1527 UNREACHABLE();
1525 } 1528 }
OLDNEW
« no previous file with comments | « runtime/bin/bin.gypi ('k') | runtime/bin/process.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698