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

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

Issue 1556373002: Turn on shutdown (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 11 months 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 static const int kApiErrorExitCode = 253; 108 static const int kApiErrorExitCode = 253;
109 // Exit code indicating a compilation error. 109 // Exit code indicating a compilation error.
110 static const int kCompilationErrorExitCode = 254; 110 static const int kCompilationErrorExitCode = 254;
111 // Exit code indicating an unhandled error that is not a compilation error. 111 // Exit code indicating an unhandled error that is not a compilation error.
112 static const int kErrorExitCode = 255; 112 static const int kErrorExitCode = 255;
113 // Exit code indicating a vm restart request. Never returned to the user. 113 // Exit code indicating a vm restart request. Never returned to the user.
114 static const int kRestartRequestExitCode = 1000; 114 static const int kRestartRequestExitCode = 1000;
115 115
116 // Global flag that is used to indicate that the VM should do a clean 116 // Global flag that is used to indicate that the VM should do a clean
117 // shutdown. 117 // shutdown.
118 static bool do_vm_shutdown = false; 118 static bool do_vm_shutdown = true;
119 119
120 static void ErrorExit(int exit_code, const char* format, ...) { 120 static void ErrorExit(int exit_code, const char* format, ...) {
121 va_list arguments; 121 va_list arguments;
122 va_start(arguments, format); 122 va_start(arguments, format);
123 Log::VPrintErr(format, arguments); 123 Log::VPrintErr(format, arguments);
124 va_end(arguments); 124 va_end(arguments);
125 fflush(stderr); 125 fflush(stderr);
126 126
127 Dart_ExitScope(); 127 Dart_ExitScope();
128 Dart_ShutdownIsolate(); 128 Dart_ShutdownIsolate();
(...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 Platform::Exit(Process::GlobalExitCode()); 1536 Platform::Exit(Process::GlobalExitCode());
1537 } 1537 }
1538 1538
1539 } // namespace bin 1539 } // namespace bin
1540 } // namespace dart 1540 } // namespace dart
1541 1541
1542 int main(int argc, char** argv) { 1542 int main(int argc, char** argv) {
1543 dart::bin::main(argc, argv); 1543 dart::bin::main(argc, argv);
1544 UNREACHABLE(); 1544 UNREACHABLE();
1545 } 1545 }
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