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

Unified Diff: runtime/bin/platform.h

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 | « no previous file | runtime/bin/platform.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/platform.h
diff --git a/runtime/bin/platform.h b/runtime/bin/platform.h
index b4c10a22fa8eeb82a66fa674776aa77e5514c169..1f52ef96d4125daad5ef9ed863bdaeea15be148e 100644
--- a/runtime/bin/platform.h
+++ b/runtime/bin/platform.h
@@ -69,7 +69,10 @@ class Platform {
static const char* GetResolvedExecutableName() {
if (resolved_executable_name_ == NULL) {
// Try to resolve the executable path using platform specific APIs.
- resolved_executable_name_ = strdup(Platform::ResolveExecutablePath());
+ const char* resolved_name = Platform::ResolveExecutablePath();
+ if (resolved_name != NULL) {
+ resolved_executable_name_ = strdup(resolved_name);
+ }
}
return resolved_executable_name_;
}
« no previous file with comments | « no previous file | runtime/bin/platform.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698