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

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

Issue 2941873002: [Fuchsia] Fix Platform.executable and Platform.resolvedExecutable (Closed)
Patch Set: Format Created 3 years, 6 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
« no previous file with comments | « runtime/bin/platform_fuchsia.cc ('k') | runtime/bin/platform_macos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "platform/globals.h" 5 #include "platform/globals.h"
6 #if defined(HOST_OS_LINUX) 6 #if defined(HOST_OS_LINUX)
7 7
8 #include "bin/platform.h" 8 #include "bin/platform.h"
9 9
10 #include <signal.h> // NOLINT 10 #include <signal.h> // NOLINT
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 *count = i; 107 *count = i;
108 char** result; 108 char** result;
109 result = reinterpret_cast<char**>(Dart_ScopeAllocate(i * sizeof(*result))); 109 result = reinterpret_cast<char**>(Dart_ScopeAllocate(i * sizeof(*result)));
110 for (intptr_t current = 0; current < i; current++) { 110 for (intptr_t current = 0; current < i; current++) {
111 result[current] = environ[current]; 111 result[current] = environ[current];
112 } 112 }
113 return result; 113 return result;
114 } 114 }
115 115
116 116
117 const char* Platform::GetExecutableName() {
118 return executable_name_;
119 }
120
121
117 const char* Platform::ResolveExecutablePath() { 122 const char* Platform::ResolveExecutablePath() {
118 return File::LinkTarget("/proc/self/exe"); 123 return File::LinkTarget("/proc/self/exe");
119 } 124 }
120 125
121 126
122 void Platform::Exit(int exit_code) { 127 void Platform::Exit(int exit_code) {
123 exit(exit_code); 128 exit(exit_code);
124 } 129 }
125 130
126 } // namespace bin 131 } // namespace bin
127 } // namespace dart 132 } // namespace dart
128 133
129 #endif // defined(HOST_OS_LINUX) 134 #endif // defined(HOST_OS_LINUX)
OLDNEW
« no previous file with comments | « runtime/bin/platform_fuchsia.cc ('k') | runtime/bin/platform_macos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698