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

Unified Diff: runtime/bin/platform.cc

Issue 1953333002: Return a null Platform.executable and resolvedExecutable on Android (Closed) Base URL: https://chromium.googlesource.com/external/github.com/dart-lang/sdk.git@master
Patch Set: Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/platform.h ('k') | runtime/bin/platform_android.cc » ('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 2099ebb7b4edc3cfa6182c93a2d04a3fc591ce5c..3dccea7083a78e73a6f79312a818cec62f4e5be0 100644
--- a/runtime/bin/platform.cc
+++ b/runtime/bin/platform.cc
@@ -40,7 +40,6 @@ void FUNCTION_NAME(Platform_LocalHostname)(Dart_NativeArguments args) {
void FUNCTION_NAME(Platform_ExecutableName)(Dart_NativeArguments args) {
- ASSERT(Platform::GetExecutableName() != NULL);
if (Dart_IsRunningPrecompiledCode()) {
// This is a work-around to be able to use most of the existing test suite
// for precompilation. Many tests do something like Process.run(
@@ -51,8 +50,12 @@ void FUNCTION_NAME(Platform_ExecutableName)(Dart_NativeArguments args) {
"Platform.executable not supported under precompilation"));
UNREACHABLE();
}
- Dart_SetReturnValue(
- args, Dart_NewStringFromCString(Platform::GetExecutableName()));
+ if (Platform::GetExecutableName() != NULL) {
+ Dart_SetReturnValue(
+ args, Dart_NewStringFromCString(Platform::GetExecutableName()));
+ } else {
+ Dart_SetReturnValue(args, Dart_Null());
+ }
}
« no previous file with comments | « runtime/bin/platform.h ('k') | runtime/bin/platform_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698