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

Unified Diff: runtime/bin/process.h

Issue 11665004: Add exitCode setter to set the exit code returned by the Dart VM (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Actually upload the correct patch Created 8 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.h
diff --git a/runtime/bin/process.h b/runtime/bin/process.h
index 0d3f704f9747057dc2da849c179a8c4440af4029..d0ac1bc70ba70ee0d638f80b857fd05bc7089783 100644
--- a/runtime/bin/process.h
+++ b/runtime/bin/process.h
@@ -6,6 +6,7 @@
#define BIN_PROCESS_H_
#include "bin/builtin.h"
+#include "bin/thread.h"
#include "platform/globals.h"
@@ -33,6 +34,16 @@ class Process {
// the thread has terminated.
static void TerminateExitCodeHandler();
+ static int GlobalExitCode() {
+ MutexLocker ml(&global_exit_code_mutex_);
+ return global_exit_code_;
+ }
+
+ static void SetGlobalExitCode(int exit_code) {
+ MutexLocker ml(&global_exit_code_mutex_);
+ global_exit_code_ = exit_code;
+ }
+
static intptr_t CurrentProcessId();
static Dart_Handle GetProcessIdNativeField(Dart_Handle process,
@@ -40,6 +51,10 @@ class Process {
static Dart_Handle SetProcessIdNativeField(Dart_Handle process,
intptr_t pid);
+ private:
+ static int global_exit_code_;
+ static dart::Mutex global_exit_code_mutex_;
+
DISALLOW_ALLOCATION();
DISALLOW_IMPLICIT_CONSTRUCTORS(Process);
};
« no previous file with comments | « runtime/bin/main.cc ('k') | runtime/bin/process.cc » ('j') | runtime/bin/process.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698