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

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

Issue 1813943004: Fix dangling pointer (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Add test Created 4 years, 9 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.h ('k') | tests/standalone/regress_26031_test.dart » ('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 "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 const char* Platform::resolved_executable_name_ = NULL; 16 char* Platform::resolved_executable_name_ = NULL;
17 int Platform::script_index_ = 1; 17 int Platform::script_index_ = 1;
18 char** Platform::argv_ = NULL; 18 char** Platform::argv_ = NULL;
19 19
20 void FUNCTION_NAME(Platform_NumberOfProcessors)(Dart_NativeArguments args) { 20 void FUNCTION_NAME(Platform_NumberOfProcessors)(Dart_NativeArguments args) {
21 Dart_SetReturnValue(args, Dart_NewInteger(Platform::NumberOfProcessors())); 21 Dart_SetReturnValue(args, Dart_NewInteger(Platform::NumberOfProcessors()));
22 } 22 }
23 23
24 24
25 void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) { 25 void FUNCTION_NAME(Platform_OperatingSystem)(Dart_NativeArguments args) {
26 Dart_SetReturnValue(args, DartUtils::NewString(Platform::OperatingSystem())); 26 Dart_SetReturnValue(args, DartUtils::NewString(Platform::OperatingSystem()));
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 } 118 }
119 } 119 }
120 120
121 121
122 void FUNCTION_NAME(Platform_GetVersion)(Dart_NativeArguments args) { 122 void FUNCTION_NAME(Platform_GetVersion)(Dart_NativeArguments args) {
123 Dart_SetReturnValue(args, Dart_NewStringFromCString(Dart_VersionString())); 123 Dart_SetReturnValue(args, Dart_NewStringFromCString(Dart_VersionString()));
124 } 124 }
125 125
126 } // namespace bin 126 } // namespace bin
127 } // namespace dart 127 } // namespace dart
OLDNEW
« no previous file with comments | « runtime/bin/platform.h ('k') | tests/standalone/regress_26031_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698