Index: runtime/bin/platform.cc |
diff --git a/runtime/bin/platform.cc b/runtime/bin/platform.cc |
index 0ed2bd364fd10eec6d347472f6233379e94a3cc1..20e0e3fc2c2a263503b5e91a2b678f8947a7e72a 100644 |
--- a/runtime/bin/platform.cc |
+++ b/runtime/bin/platform.cc |
@@ -46,12 +46,23 @@ void FUNCTION_NAME(Platform_LocalHostname)(Dart_NativeArguments args) { |
void FUNCTION_NAME(Platform_ExecutableName)(Dart_NativeArguments args) { |
ASSERT(Platform::GetExecutableName() != NULL); |
+ if (Dart_IsRunningPrecompiledCode()) { |
+ Dart_ThrowException(Dart_NewStringFromCString( |
+ "Platform.executable not supported under precompilation")); |
+ UNREACHABLE(); |
+ } |
Dart_SetReturnValue( |
args, Dart_NewStringFromCString(Platform::GetExecutableName())); |
} |
void FUNCTION_NAME(Platform_ResolvedExecutableName)(Dart_NativeArguments args) { |
+ if (Dart_IsRunningPrecompiledCode()) { |
+ Dart_ThrowException(Dart_NewStringFromCString( |
+ "Platform.resolvedExecutable not supported under precompilation")); |
+ UNREACHABLE(); |
+ } |
+ |
if (Platform::GetResolvedExecutableName() != NULL) { |
Dart_SetReturnValue( |
args, Dart_NewStringFromCString(Platform::GetResolvedExecutableName())); |