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

Unified Diff: runtime/bin/platform.cc

Issue 22565003: Make the values of Platform.executable and Platform.script available to all isolates (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments from whesse@ Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/platform.h ('k') | runtime/bin/platform_patch.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/platform.cc
diff --git a/runtime/bin/platform.cc b/runtime/bin/platform.cc
index 055d3440da85c0ee42261c5f0402d58aece80671..4d1bbedad4927312963fec3aaada269591a2dcb6 100644
--- a/runtime/bin/platform.cc
+++ b/runtime/bin/platform.cc
@@ -12,6 +12,8 @@
namespace dart {
namespace bin {
+const char* Platform::executable_name_ = NULL;
+
void FUNCTION_NAME(Platform_NumberOfProcessors)(Dart_NativeArguments args) {
Dart_SetReturnValue(args, Dart_NewInteger(Platform::NumberOfProcessors()));
}
@@ -38,6 +40,12 @@ void FUNCTION_NAME(Platform_LocalHostname)(Dart_NativeArguments args) {
}
+void FUNCTION_NAME(Platform_ExecutableName)(Dart_NativeArguments args) {
+ ASSERT(Platform::GetExecutableName() != NULL);
+ Dart_SetReturnValue(
+ args, Dart_NewStringFromCString(Platform::GetExecutableName()));
+}
+
void FUNCTION_NAME(Platform_Environment)(Dart_NativeArguments args) {
intptr_t count = 0;
char** env = Platform::Environment(&count);
« no previous file with comments | « runtime/bin/platform.h ('k') | runtime/bin/platform_patch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698