Chromium Code Reviews| Index: runtime/bin/file_impl.dart |
| diff --git a/runtime/bin/file_impl.dart b/runtime/bin/file_impl.dart |
| index e1ff548fb669cfe7ba00be357490453da5ea5226..3e1f153f5c33b58eb0483d0d10844391d4e42604 100644 |
| --- a/runtime/bin/file_impl.dart |
| +++ b/runtime/bin/file_impl.dart |
| @@ -217,13 +217,14 @@ class _FileOutputStream extends _BaseOutputStream implements OutputStream { |
|
Bill Hesse
2012/08/08 14:21:11
This will all need some work if we want writes aft
|
| void close() { |
| + _streamMarkedClosed = true; |
| if (_file == null) { |
| _pendingOperations.add(_PendingOperation.CLOSE); |
| - } else if (!_streamMarkedClosed) { |
| + } else if (!_closeCallbackCalled) { |
|
Bill Hesse
2012/08/08 14:21:11
Call this _closeCallbackScheduled.
nweiz
2012/08/09 19:39:52
Done.
|
| _file.close().then((ignore) { |
| if (_onClosed != null) _onClosed(); |
| }); |
| - _streamMarkedClosed = true; |
| + _closeCallbackCalled = true; |
| } |
| } |
| @@ -279,6 +280,8 @@ class _FileOutputStream extends _BaseOutputStream implements OutputStream { |
| }); |
| } |
| + bool get closed() => _streamMarkedClosed; |
| + |
| RandomAccessFile _file; |
| // When this is set to true the stream is marked closed. When a |