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

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

Issue 1419333008: Turn on shutdown (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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 | « no previous file | runtime/vm/dart.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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 // Global flag that is used to indicate that the VM should do a clean 121 // Global flag that is used to indicate that the VM should do a clean
122 // shutdown. 122 // shutdown.
123 static bool do_vm_shutdown = false; 123 static bool do_vm_shutdown = true;
124 124
125 static void ErrorExit(int exit_code, const char* format, ...) { 125 static void ErrorExit(int exit_code, const char* format, ...) {
126 va_list arguments; 126 va_list arguments;
127 va_start(arguments, format); 127 va_start(arguments, format);
128 Log::VPrintErr(format, arguments); 128 Log::VPrintErr(format, arguments);
129 va_end(arguments); 129 va_end(arguments);
130 fflush(stderr); 130 fflush(stderr);
131 131
132 Dart_ExitScope(); 132 Dart_ExitScope();
133 Dart_ShutdownIsolate(); 133 Dart_ShutdownIsolate();
(...skipping 1385 matching lines...) Expand 10 before | Expand all | Expand 10 after
1519 Platform::Exit(Process::GlobalExitCode()); 1519 Platform::Exit(Process::GlobalExitCode());
1520 } 1520 }
1521 1521
1522 } // namespace bin 1522 } // namespace bin
1523 } // namespace dart 1523 } // namespace dart
1524 1524
1525 int main(int argc, char** argv) { 1525 int main(int argc, char** argv) {
1526 dart::bin::main(argc, argv); 1526 dart::bin::main(argc, argv);
1527 UNREACHABLE(); 1527 UNREACHABLE();
1528 } 1528 }
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/dart.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698