Index: runtime/bin/main.cc |
diff --git a/runtime/bin/main.cc b/runtime/bin/main.cc |
index 21fde137d62be90016eece862e7baf3ff78f0e70..08f35c9b1571db48020e576259e2ab6776a41b2e 100644 |
--- a/runtime/bin/main.cc |
+++ b/runtime/bin/main.cc |
@@ -133,7 +133,6 @@ static void ErrorExit(int exit_code, const char* format, ...) { |
va_start(arguments, format); |
Log::VPrintErr(format, arguments); |
va_end(arguments); |
- fflush(stderr); |
siva
2016/11/22 05:23:53
Why did you remove this fflush(stderr); ?
rmacnak
2016/11/22 17:58:45
VPrintErr already does a flush
|
Dart_ExitScope(); |
Dart_ShutdownIsolate(); |
@@ -1589,9 +1588,8 @@ bool RunMainIsolate(const char* script_name, CommandLineOptions* dart_options) { |
// Load the embedder's portion of the VM service's Dart code so it will |
// be included in the app snapshot. |
if (!VmService::LoadForGenPrecompiled()) { |
- fprintf(stderr, "VM service loading failed: %s\n", |
- VmService::GetErrorMessage()); |
- fflush(stderr); |
+ Log::PrintErr("VM service loading failed: %s\n", |
+ VmService::GetErrorMessage()); |
exit(kErrorExitCode); |
} |
} |
@@ -1839,8 +1837,7 @@ void main(int argc, char** argv) { |
if (!DartUtils::SetOriginalWorkingDirectory()) { |
OSError err; |
- fprintf(stderr, "Error determining current directory: %s\n", err.message()); |
- fflush(stderr); |
+ Log::PrintErr("Error determining current directory: %s\n", err.message()); |
Platform::Exit(kErrorExitCode); |
} |
@@ -1901,8 +1898,7 @@ void main(int argc, char** argv) { |
char* error = Dart_Initialize(&init_params); |
if (error != NULL) { |
EventHandler::Stop(); |
- fprintf(stderr, "VM initialization failed: %s\n", error); |
- fflush(stderr); |
+ Log::PrintErr("VM initialization failed: %s\n", error); |
free(error); |
Platform::Exit(kErrorExitCode); |
} |