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

Unified Diff: runtime/bin/process.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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/main.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/process.cc
diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc
index 77461987bc0e396f319792e01db074e73b2b09f6..81886934817bc46b5a421e9c4210ac864cfc3df3 100644
--- a/runtime/bin/process.cc
+++ b/runtime/bin/process.cc
@@ -17,10 +17,6 @@
namespace dart {
namespace bin {
-// Global flag that is used to indicate that the VM should do a clean
-// shutdown.
-bool do_vm_shutdown = false;
-
static const int kProcessIdNativeField = 0;
int Process::global_exit_code_ = 0;
@@ -254,25 +250,7 @@ void FUNCTION_NAME(Process_Exit)(Dart_NativeArguments args) {
int64_t status = 0;
// Ignore result if passing invalid argument and just exit 0.
DartUtils::GetInt64Value(Dart_GetNativeArgument(args, 0), &status);
- Dart_ShutdownIsolate();
- Process::TerminateExitCodeHandler();
- char* error = Dart_Cleanup();
- if (error != NULL) {
- Log::PrintErr("VM cleanup failed: %s\n", error);
- free(error);
- }
- if (do_vm_shutdown) {
-#ifdef LEGACY_DEBUG_PROTOCOL_ENABLED
- // Note that this dependency crosses logical project boundaries by making
- // the dart:io implementation depend upon the standalone VM's legacy debug
- // protocol. This breaks projects which want to use our dart:io
- // implementation. Because the protocol is going away shortly, it's
- // reasonable to leave it behind a #ifdef that is only enabled for the
- // standalone VM for now.
- DebuggerConnectionHandler::StopHandler();
-#endif
- EventHandler::Stop();
- }
+ Dart_ExitIsolate();
Platform::Exit(static_cast<int>(status));
}
« no previous file with comments | « runtime/bin/main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698