Chromium Code Reviews| Index: tools/testing/dart/test_runner.dart |
| diff --git a/tools/testing/dart/test_runner.dart b/tools/testing/dart/test_runner.dart |
| index 012f1daf5eed9d8f2476eafd5ae75c8f173354e2..bc6718431d970b46b3147ed618d6623148204d7d 100644 |
| --- a/tools/testing/dart/test_runner.dart |
| +++ b/tools/testing/dart/test_runner.dart |
| @@ -198,11 +198,13 @@ class CompilationCommand extends Command { |
| for (var ending in ['', '.deps', '.map']) { |
| var fromFile = new io.File("${from}${ending}"); |
| var toFile = new io.File("${to}${ending}"); |
| - // We copy the dart2js results synchronously to make it atomic. |
| - // This ensures that the shadow files are always in a consistent state (no |
| - // other code in the testing scripts will see a half-written shadow |
| - // file). |
| - toFile.writeAsBytesSync(fromFile.readAsBytesSync()); |
| + if (fromFile.existsSync()) { |
|
kustermann
2013/06/25 13:58:57
Seems like we don't have .map files with dart2dart
|
| + // We copy the dart2js results synchronously to make it atomic. |
| + // This ensures that the shadow files are always in a consistent state |
| + // (no other code in the testing scripts will see a half-written shadow |
| + // file). |
| + toFile.writeAsBytesSync(fromFile.readAsBytesSync()); |
| + } |
| } |
| } |
| } |