| Index: sdk/lib/io/file_impl.dart
|
| diff --git a/sdk/lib/io/file_impl.dart b/sdk/lib/io/file_impl.dart
|
| index 761a794400c0436e31119c5a7bc4bed435cae339..c5d77ec4f9df2875264e5258671c3596f5e82628 100644
|
| --- a/sdk/lib/io/file_impl.dart
|
| +++ b/sdk/lib/io/file_impl.dart
|
| @@ -576,12 +576,12 @@ class _File extends _FileBase implements File {
|
| return open(mode).then((file) {
|
| var controller = new StreamController();
|
|
|
| - var subscription = controller.subscribe();
|
| - subscription.onData((data) {
|
| - // TODO(ajohnsen): handle errors correctly.
|
| - file.writeList(data, 0, data.length);
|
| - });
|
| - subscription.onDone(file.close);
|
| + var subscription = controller.listen(
|
| + (data) {
|
| + // TODO(ajohnsen): handle errors correctly.
|
| + file.writeList(data, 0, data.length);
|
| + },
|
| + onDone: file.close);
|
|
|
| return controller.sink;
|
| });
|
|
|