[vm] Silence output from kernel::Program::ReadFromFile.

It is used by hot-reload to check if a file is a kernel binary - so it makes
no sense to output failures to the stderr.

Change-Id: Ie2ebd5ff47990eec950550e333a41aaf5f8d7973
Reviewed-on: https://dart-review.googlesource.com/c/80224
Commit-Queue: Vyacheslav Egorov <vegorov@google.com>
Commit-Queue: Martin Kustermann <kustermann@google.com>
Auto-Submit: Vyacheslav Egorov <vegorov@google.com>
Reviewed-by: Martin Kustermann <kustermann@google.com>
This commit is contained in:
Vyacheslav Egorov
2018-10-16 14:49:01 +00:00
committed by commit-bot@chromium.org
parent c0ec6299ad
commit 2495e2e951
3 changed files with 8 additions and 6 deletions
+2 -2
View File
@@ -21,7 +21,7 @@ cc/Profiler_FunctionInline: Pass, Fail # Flaky failure.
cc/Profiler_InliningIntervalBoundry: Skip # Differences in ia32, debug, release
cc/SNPrint_BadArgs: Crash, Fail # These tests are expected to crash on all platforms.
dart/data_uri_import_test/none: SkipByDesign
dart/entrypoints/*: Skip # Only supported in Dart 2 JIT (hot-reload -> issue 34199).
dart/entrypoints/*: Skip # Only supported in Dart 2 JIT.
dart/snapshot_version_test: Skip # This test is a Dart1 test (script snapshot)
dart/slow_path_shared_stub_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
dart/stack_overflow_shared_test: Pass, Slow # Uses --shared-slow-path-triggers-gc flag.
@@ -52,7 +52,7 @@ dart/truncating_ints_test: SkipByDesign # The test requires int64.
dart/wrap_around_in_range_analysis_test: SkipByDesign # The test requires int64.
[ $compiler != dartk || ($arch != x64 && $arch != simarm && $arch != arm) || $hot_reload || $hot_reload_rollback ]
dart/entrypoints/*: Skip # Only supported in Dart 2 JIT (hot-reload -> issue 34199).
dart/entrypoints/*: SkipByDesign # Only supported in the Dart 2 JIT and test optimizations - hence disabled on hotreload bots.
[ ($compiler == dartk || $compiler == dartkb) ]
cc/DartAPI_New: Fail # Issue #33041
+2 -1
View File
@@ -63,7 +63,8 @@ class Program {
// etc will reference the last "sub program" only.
static Program* ReadFrom(Reader* reader, const char** error = nullptr);
static Program* ReadFromFile(const char* script_uri);
static Program* ReadFromFile(const char* script_uri,
const char** error = nullptr);
static Program* ReadFromBuffer(const uint8_t* buffer,
intptr_t buffer_length,
const char** error = nullptr);
+4 -3
View File
@@ -117,7 +117,8 @@ Program* Program::ReadFrom(Reader* reader, const char** error) {
return program;
}
Program* Program::ReadFromFile(const char* script_uri) {
Program* Program::ReadFromFile(const char* script_uri,
const char** error /* = nullptr */) {
Thread* thread = Thread::Current();
if (script_uri == NULL) {
return NULL;
@@ -147,8 +148,8 @@ Program* Program::ReadFromFile(const char* script_uri) {
kernel_program =
kernel::Program::ReadFromBuffer(kernel_buffer, kernel_buffer_size);
} else {
THR_Print("tag handler failed: %s\n", Dart_GetError(retval));
} else if (error != nullptr) {
*error = Dart_GetError(retval);
}
}
return kernel_program;