Commit 1ab83e66 authored by Ian Hickson's avatar Ian Hickson

Merge pull request #894 from Hixie/rev

rev the engine
parents cb1ee0f6 ab901beb
...@@ -7,8 +7,8 @@ dependencies: ...@@ -7,8 +7,8 @@ dependencies:
collection: '>=1.1.3 <2.0.0' collection: '>=1.1.3 <2.0.0'
intl: '>=0.12.4+2 <0.13.0' intl: '>=0.12.4+2 <0.13.0'
material_design_icons: '>=0.0.3 <0.1.0' material_design_icons: '>=0.0.3 <0.1.0'
sky_engine: 0.0.70 sky_engine: 0.0.71
sky_services: 0.0.70 sky_services: 0.0.71
vector_math: '>=1.4.3 <2.0.0' vector_math: '>=1.4.3 <2.0.0'
# To pin the transitive dependency through mojo_sdk. # To pin the transitive dependency through mojo_sdk.
......
...@@ -32,9 +32,8 @@ class PipeToFile { ...@@ -32,9 +32,8 @@ class PipeToFile {
Future<int> drain() { Future<int> drain() {
Completer<int> completer = new Completer(); Completer<int> completer = new Completer();
// TODO(mpcomplete): Is it legit to pass an async callback to subscribe? _events.subscribe((int signal) {
_events.subscribe((List<int> event) async { (() async {
int signal = event[1];
if (MojoHandleSignals.isReadable(signal)) { if (MojoHandleSignals.isReadable(signal)) {
int result = await _doRead(); int result = await _doRead();
if (result != MojoResult.kOk) { if (result != MojoResult.kOk) {
...@@ -53,6 +52,7 @@ class PipeToFile { ...@@ -53,6 +52,7 @@ class PipeToFile {
} else { } else {
throw 'Unexpected handle event: ${MojoHandleSignals.string(signal)}'; throw 'Unexpected handle event: ${MojoHandleSignals.string(signal)}';
} }
})();
}); });
return completer.future; return completer.future;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment