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

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

Issue 1177153005: Enables clean VM shutdown. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Kill isolates from the service isolate Created 5 years, 5 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
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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 static void ErrorExit(int exit_code, const char* format, ...) { 90 static void ErrorExit(int exit_code, const char* format, ...) {
91 va_list arguments; 91 va_list arguments;
92 va_start(arguments, format); 92 va_start(arguments, format);
93 Log::VPrintErr(format, arguments); 93 Log::VPrintErr(format, arguments);
94 va_end(arguments); 94 va_end(arguments);
95 fflush(stderr); 95 fflush(stderr);
96 96
97 Dart_ExitScope(); 97 Dart_ExitScope();
98 Dart_ShutdownIsolate(); 98 Dart_ShutdownIsolate();
99 99
100 // Terminate process exit-code handler.
101 Process::TerminateExitCodeHandler();
102
100 Dart_Cleanup(); 103 Dart_Cleanup();
101 104
102 exit(exit_code); 105 exit(exit_code);
103 } 106 }
104 107
105 108
106 // The environment provided through the command line using -D options. 109 // The environment provided through the command line using -D options.
107 static dart::HashMap* environment = NULL; 110 static dart::HashMap* environment = NULL;
108 111
109 static bool IsValidFlag(const char* name, 112 static bool IsValidFlag(const char* name,
(...skipping 974 matching lines...) Expand 10 before | Expand all | Expand 10 after
1084 exit(Process::GlobalExitCode()); 1087 exit(Process::GlobalExitCode());
1085 } 1088 }
1086 1089
1087 } // namespace bin 1090 } // namespace bin
1088 } // namespace dart 1091 } // namespace dart
1089 1092
1090 int main(int argc, char** argv) { 1093 int main(int argc, char** argv) {
1091 dart::bin::main(argc, argv); 1094 dart::bin::main(argc, argv);
1092 UNREACHABLE(); 1095 UNREACHABLE();
1093 } 1096 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698