Chromium Code Reviews| Index: runtime/bin/builtin_natives.cc |
| diff --git a/runtime/bin/builtin_natives.cc b/runtime/bin/builtin_natives.cc |
| index 07cc545380ee1341a9702ec39a6c90607f82c33a..80844970dfdce2206c604a829b1ab45166994337 100644 |
| --- a/runtime/bin/builtin_natives.cc |
| +++ b/runtime/bin/builtin_natives.cc |
| @@ -13,6 +13,7 @@ |
| #include "bin/builtin.h" |
| #include "bin/dartutils.h" |
| #include "bin/io_natives.h" |
| +#include "bin/platform.h" |
| namespace dart { |
| namespace bin { |
| @@ -108,12 +109,10 @@ void FUNCTION_NAME(Logger_PrintString)(Dart_NativeArguments args) { |
| // an isolate gets interrupted by the embedder in the middle of |
| // Dart_StringToUTF8? We need to make sure not to swallow the |
| // interrupt. |
| - fputs(Dart_GetError(result), stdout); |
| + Platform::PrintBlocking(stdout, "%s\n", Dart_GetError(result)); |
| } else { |
| - fwrite(chars, sizeof(*chars), length, stdout); |
| + Platform::PrintBlocking(stdout, "%.*s\n", length, chars); |
|
Søren Gjesse
2013/10/01 07:16:39
I was not aware of the * for precision.
Anders Johnsen
2013/10/01 09:05:21
Let's see if all the platforms supports it :)
|
| } |
| - fputc('\n', stdout); |
| - fflush(stdout); |
| } |
| } // namespace bin |