Chromium Code Reviews| Index: runtime/bin/io_service_patch.dart |
| diff --git a/runtime/bin/io_service_patch.dart b/runtime/bin/io_service_patch.dart |
| index c6a703529cf9fd67fe50451879e337ca6c48ae44..8f5a593055d923a75c26941b1f75f1a34000dbe4 100644 |
| --- a/runtime/bin/io_service_patch.dart |
| +++ b/runtime/bin/io_service_patch.dart |
| @@ -30,13 +30,14 @@ patch class _IOService { |
| } |
| if (_receivePort == null) { |
| _receivePort = new ReceivePort(); |
| - _replyToPort = _receivePort.toSendPort(); |
| - _receivePort.receive((data, _) { |
| + _replyToPort = _receivePort.sendPort; |
| + StreamSubscription subscription; |
| + subscription = _receivePort.listen((data) { |
|
Ivan Posva
2013/10/24 06:48:38
This is one of those occasions where I would expec
floitsch
2013/10/24 16:15:58
just wasn't changed back yet.
done.
|
| assert(data is List && data.length == 2); |
| _messageMap.remove(data[0]).complete(data[1]); |
| if (_messageMap.length == 0) { |
| _id = 0; |
| - _receivePort.close(); |
| + subscription.cancel(); |
| _receivePort = null; |
| } |
| }); |