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

Unified Diff: pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart

Issue 93143002: Make pkg/stack_trace use stack chains. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 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: pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart
diff --git a/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart b/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart
index 9111b3dd656824a6a479bfd1610d70727fe21d7b..515f6e48a6fac2023fca2561324ae1b61726845b 100644
--- a/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart
+++ b/pkg/scheduled_test/lib/src/descriptor/file_descriptor.dart
@@ -10,6 +10,7 @@ import 'dart:io';
import 'dart:math' as math;
import 'package:path/path.dart' as path;
+import 'package:stack_trace/stack_trace.dart';
import '../../descriptor.dart';
import '../../scheduled_test.dart';
@@ -49,7 +50,8 @@ abstract class FileDescriptor extends Descriptor implements ReadableDescriptor {
Future create([String parent]) => schedule(() {
if (parent == null) parent = defaultRoot;
- return new File(path.join(parent, name)).writeAsBytes(contents);
+ return Chain.track(new File(path.join(parent, name))
+ .writeAsBytes(contents));
}, "creating file '$name'");
Future validate([String parent]) =>
@@ -62,7 +64,7 @@ abstract class FileDescriptor extends Descriptor implements ReadableDescriptor {
fail("File not found: '$fullPath'.");
}
- return new File(fullPath).readAsBytes().then(_validateNow);
+ return Chain.track(new File(fullPath).readAsBytes()).then(_validateNow);
}
// TODO(nweiz): rather than setting up an inheritance chain, just store a

Powered by Google App Engine
This is Rietveld 408576698