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

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

Issue 1145053002: Make Platform.executable return a fully qualified path the the executable (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Fix comment Created 5 years, 7 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 "bin/platform.h" 5 #include "bin/platform.h"
6 6
7 #include "include/dart_api.h" 7 #include "include/dart_api.h"
8 8
9 #include "bin/file.h" 9 #include "bin/file.h"
10 #include "bin/utils.h" 10 #include "bin/utils.h"
11 11
12 namespace dart { 12 namespace dart {
13 namespace bin { 13 namespace bin {
14 14
15 const char* Platform::executable_name_ = NULL; 15 const char* Platform::executable_name_ = NULL;
16 bool Platform::executable_name_resolved_ = false;
16 const char* Platform::package_root_ = NULL; 17 const char* Platform::package_root_ = NULL;
17 int Platform::script_index_ = 1; 18 int Platform::script_index_ = 1;
18 char** Platform::argv_ = NULL; 19 char** Platform::argv_ = NULL;
19 20
20 void FUNCTION_NAME(Platform_NumberOfProcessors)(Dart_NativeArguments args) { 21 void FUNCTION_NAME(Platform_NumberOfProcessors)(Dart_NativeArguments args) {
21 Dart_SetReturnValue(args, Dart_NewInteger(Platform::NumberOfProcessors())); 22 Dart_SetReturnValue(args, Dart_NewInteger(Platform::NumberOfProcessors()));
22 } 23 }
23 24
24 25
25 void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) { 26 void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) {
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 } 106 }
106 } 107 }
107 108
108 109
109 void FUNCTION_NAME(Platform_GetVersion)(Dart_NativeArguments args) { 110 void FUNCTION_NAME(Platform_GetVersion)(Dart_NativeArguments args) {
110 Dart_SetReturnValue(args, Dart_NewStringFromCString(Dart_VersionString())); 111 Dart_SetReturnValue(args, Dart_NewStringFromCString(Dart_VersionString()));
111 } 112 }
112 113
113 } // namespace bin 114 } // namespace bin
114 } // namespace dart 115 } // namespace dart
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698