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

Unified Diff: runtime/bin/platform.cc

Issue 1507943002: Add ./tools/test.py -c precompiler -r dart_precompiled. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years 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
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()));

Powered by Google App Engine
This is Rietveld 408576698