Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 patch class ReceivePort { | 5 patch class ReceivePort { |
| 6 /* patch */ factory ReceivePort() = _ReceivePortImpl; | 6 /* patch */ factory ReceivePort() = _ReceivePortImpl; |
| 7 | 7 |
| 8 /* patch */ factory ReceivePort.fromRawReceivePort(RawReceivePort rawPort) = | 8 /* patch */ factory ReceivePort.fromRawReceivePort(RawReceivePort rawPort) = |
| 9 _ReceivePortImpl.fromRawReceivePort; | 9 _ReceivePortImpl.fromRawReceivePort; |
| 10 } | 10 } |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 44 onError: onError, | 44 onError: onError, |
| 45 onDone: onDone, | 45 onDone: onDone, |
| 46 cancelOnError: cancelOnError); | 46 cancelOnError: cancelOnError); |
| 47 } | 47 } |
| 48 | 48 |
| 49 close() { | 49 close() { |
| 50 _rawPort.close(); | 50 _rawPort.close(); |
| 51 _controller.close(); | 51 _controller.close(); |
| 52 } | 52 } |
| 53 | 53 |
| 54 int get _id => _rawPort._id; | |
|
Ivan Posva
2013/10/29 03:35:50
Please remove.
Cutch
2013/10/29 05:24:57
Done.
| |
| 54 final RawReceivePort _rawPort; | 55 final RawReceivePort _rawPort; |
| 55 StreamController _controller; | 56 StreamController _controller; |
| 56 } | 57 } |
| 57 | 58 |
| 58 class _RawReceivePortImpl implements RawReceivePort { | 59 class _RawReceivePortImpl implements RawReceivePort { |
| 59 factory _RawReceivePortImpl() native "RawReceivePortImpl_factory"; | 60 factory _RawReceivePortImpl() native "RawReceivePortImpl_factory"; |
| 60 | 61 |
| 61 close() { | 62 close() { |
| 62 _portMap.remove(_id); | 63 _portMap.remove(_id); |
| 63 _closeInternal(_id); | 64 _closeInternal(_id); |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 243 } | 244 } |
| 244 | 245 |
| 245 static final RawReceivePort _self = _mainPort; | 246 static final RawReceivePort _self = _mainPort; |
| 246 static RawReceivePort get _mainPort native "Isolate_mainPort"; | 247 static RawReceivePort get _mainPort native "Isolate_mainPort"; |
| 247 | 248 |
| 248 static SendPort _spawnFunction(Function topLevelFunction) | 249 static SendPort _spawnFunction(Function topLevelFunction) |
| 249 native "Isolate_spawnFunction"; | 250 native "Isolate_spawnFunction"; |
| 250 | 251 |
| 251 static SendPort _spawnUri(String uri) native "Isolate_spawnUri"; | 252 static SendPort _spawnUri(String uri) native "Isolate_spawnUri"; |
| 252 } | 253 } |
| OLD | NEW |