Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 part of html; | 5 part of html; |
| 6 | 6 |
| 7 _makeSendPortFuture(spawnRequest) { | 7 _makeSendPortFuture(spawnRequest) { |
| 8 final completer = new Completer<SendPort>(); | 8 final completer = new Completer<SendPort>.sync(); |
|
Anton Muhin
2013/05/13 09:19:36
DBQ: do you know why it's needed?
floitsch
2013/05/13 09:21:21
Not completely. There must be something that requi
Anton Muhin
2013/05/14 13:55:33
Thanks a lot, Florian, I'll have a look.
On 2013/
| |
| 9 final port = new ReceivePort(); | 9 final port = new ReceivePort(); |
| 10 port.receive((result, _) { | 10 port.receive((result, _) { |
| 11 completer.complete(result); | 11 completer.complete(result); |
| 12 port.close(); | 12 port.close(); |
| 13 }); | 13 }); |
| 14 // TODO: SendPort.hashCode is ugly way to access port id. | 14 // TODO: SendPort.hashCode is ugly way to access port id. |
| 15 spawnRequest(port.toSendPort().hashCode); | 15 spawnRequest(port.toSendPort().hashCode); |
| 16 return completer.future; | 16 return completer.future; |
| 17 } | 17 } |
| 18 | 18 |
| (...skipping 19 matching lines...) Expand all Loading... | |
| 38 final _NPObject _npObject; | 38 final _NPObject _npObject; |
| 39 | 39 |
| 40 TestRunner._(this._npObject); | 40 TestRunner._(this._npObject); |
| 41 | 41 |
| 42 display() => _npObject.invoke('display'); | 42 display() => _npObject.invoke('display'); |
| 43 dumpAsText() => _npObject.invoke('dumpAsText'); | 43 dumpAsText() => _npObject.invoke('dumpAsText'); |
| 44 notifyDone() => _npObject.invoke('notifyDone'); | 44 notifyDone() => _npObject.invoke('notifyDone'); |
| 45 setCanOpenWindows() => _npObject.invoke('setCanOpenWindows'); | 45 setCanOpenWindows() => _npObject.invoke('setCanOpenWindows'); |
| 46 waitUntilDone() => _npObject.invoke('waitUntilDone'); | 46 waitUntilDone() => _npObject.invoke('waitUntilDone'); |
| 47 } | 47 } |
| OLD | NEW |