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

Unified Diff: runtime/bin/process.cc

Issue 109803002: Profiler Take 2 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years 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
Index: runtime/bin/process.cc
diff --git a/runtime/bin/process.cc b/runtime/bin/process.cc
index d7dd894636294bb87338b7590a32a6e67e2b623c..69a02c6d5f941c311de92ede5573e66925cb7278 100644
--- a/runtime/bin/process.cc
+++ b/runtime/bin/process.cc
@@ -9,7 +9,7 @@
#include "bin/socket.h"
#include "include/dart_api.h"
-
+#include "include/dart_native_api.h"
namespace dart {
namespace bin {
@@ -208,6 +208,9 @@ 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);
+ // On Windows we must shut down the thread interrupter before exiting,
+ // otherwise we may end up with a suspended thread and hung process.
+ Dart_ShutdownThreadInterrupter();
siva 2013/12/13 21:29:14 Could we just call Dart_Cleanup() here, that would
Cutch 2013/12/13 22:40:18 Done.
// Be sure to do platform-specific cleanups.
Platform::Cleanup();
exit(static_cast<int>(status));

Powered by Google App Engine
This is Rietveld 408576698