Index: third_party/mojo/src/mojo/public/dart/src/proxy.dart |
diff --git a/third_party/mojo/src/mojo/public/dart/src/proxy.dart b/third_party/mojo/src/mojo/public/dart/src/proxy.dart |
index f7c770f661eec75e183809e3249d5f7e2b0614f2..5317e5648b558843fb533c2e90c1b1f66083dccf 100644 |
--- a/third_party/mojo/src/mojo/public/dart/src/proxy.dart |
+++ b/third_party/mojo/src/mojo/public/dart/src/proxy.dart |
@@ -8,17 +8,17 @@ abstract class Proxy extends core.MojoEventStreamListener { |
Map<int, Completer> _completerMap; |
int _nextId = 0; |
- Proxy(core.MojoMessagePipeEndpoint endpoint) : |
- _completerMap = {}, |
- super(endpoint); |
+ Proxy.fromEndpoint(core.MojoMessagePipeEndpoint endpoint) |
+ : _completerMap = {}, |
+ super.fromEndpoint(endpoint); |
- Proxy.fromHandle(core.MojoHandle handle) : |
- _completerMap = {}, |
- super.fromHandle(handle); |
+ Proxy.fromHandle(core.MojoHandle handle) |
+ : _completerMap = {}, |
+ super.fromHandle(handle); |
- Proxy.unbound() : |
- _completerMap = {}, |
- super.unbound(); |
+ Proxy.unbound() |
+ : _completerMap = {}, |
+ super.unbound(); |
void handleResponse(ServiceMessage reader); |
@@ -47,15 +47,13 @@ abstract class Proxy extends core.MojoEventStreamListener { |
var header = new MessageHeader(name); |
var serviceMessage = message.serializeWithHeader(header); |
endpoint.write(serviceMessage.buffer, |
- serviceMessage.buffer.lengthInBytes, |
- serviceMessage.handles); |
+ serviceMessage.buffer.lengthInBytes, serviceMessage.handles); |
if (!endpoint.status.isOk) { |
throw "message pipe write failed - ${endpoint.status}"; |
} |
} |
- Future sendMessageWithRequestId( |
- Struct message, int name, int id, int flags) { |
+ Future sendMessageWithRequestId(Struct message, int name, int id, int flags) { |
if (!isOpen) { |
listen(); |
} |
@@ -66,8 +64,7 @@ abstract class Proxy extends core.MojoEventStreamListener { |
var header = new MessageHeader.withRequestId(name, flags, id); |
var serviceMessage = message.serializeWithHeader(header); |
endpoint.write(serviceMessage.buffer, |
- serviceMessage.buffer.lengthInBytes, |
- serviceMessage.handles); |
+ serviceMessage.buffer.lengthInBytes, serviceMessage.handles); |
if (!endpoint.status.isOk) { |
throw "message pipe write failed - ${endpoint.status}"; |
} |
@@ -79,11 +76,15 @@ abstract class Proxy extends core.MojoEventStreamListener { |
// Need a getter for this for access in subclasses. |
Map<int, Completer> get completerMap => _completerMap; |
-} |
+ String toString() { |
+ var superString = super.toString(); |
+ return "Proxy(${superString})"; |
+ } |
+} |
// Generated Proxy classes implement this interface. |
abstract class ProxyBase { |
- final Proxy impl; |
- final String name; |
+ final Proxy impl = null; |
+ final String name = null; |
} |