Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(45)

Unified Diff: third_party/mojo/src/mojo/public/dart/src/codec.dart

Issue 1157573002: Revert "Update mojo sdk to rev 1dc8a9a5db73d3718d99917fadf31f5fb2ebad4f" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/mojo/src/mojo/public/dart/src/codec.dart
diff --git a/third_party/mojo/src/mojo/public/dart/lib/src/codec.dart b/third_party/mojo/src/mojo/public/dart/src/codec.dart
similarity index 98%
rename from third_party/mojo/src/mojo/public/dart/lib/src/codec.dart
rename to third_party/mojo/src/mojo/public/dart/src/codec.dart
index 07bad358bbff0ad229c4f4a464f3b970cbd5dafd..89e32c279ba75e4d2ec7b6eabcfd715c4a181821 100644
--- a/third_party/mojo/src/mojo/public/dart/lib/src/codec.dart
+++ b/third_party/mojo/src/mojo/public/dart/src/codec.dart
@@ -201,10 +201,11 @@ class Encoder {
void encodeInterface(
core.MojoEventStreamListener interface, int offset, bool nullable) {
+ // Set the version field to 0 for now.
+ encodeUint32(0, offset + kSerializedHandleSize);
+
if (interface == null) {
encodeInvalideHandle(offset, nullable);
- // Set the version field to 0.
- encodeUint32(0, offset + kSerializedHandleSize);
return;
}
if (interface is Stub) {
@@ -213,8 +214,6 @@ class Encoder {
interface.bind(pipe.endpoints[0]);
interface.listen();
encodeMessagePipeHandle(pipe.endpoints[1], offset, nullable);
- // Set the version to the version in the stub.
- encodeUint32(interface.version, offset + kSerializedHandleSize);
} else if (interface is Proxy) {
assert(interface.isBound);
if (!interface.isOpen) {
@@ -223,8 +222,6 @@ class Encoder {
interface.listen();
}
encodeMessagePipeHandle(interface.endpoint, offset, nullable);
- // Set the version to the current version of the proxy.
- encodeUint32(interface.version, offset + kSerializedHandleSize);
} else {
throw new MojoCodecError(
'Trying to encode an unknown MojoEventStreamListener');
@@ -597,14 +594,9 @@ class Decoder {
ProxyBase decodeServiceInterface(
int offset, bool nullable, Function clientFactory) {
+ // Ignore the version field for now.
var endpoint = decodeMessagePipeHandle(offset, nullable);
- var version = decodeUint32(offset + kSerializedHandleSize);
- if (!endpoint.handle.isValid) {
- return null;
- }
- ProxyBase client = clientFactory(endpoint);
- client.impl._version = version;
- return client;
+ return endpoint.handle.isValid ? clientFactory(endpoint) : null;
}
Stub decodeInterfaceRequest(
« no previous file with comments | « third_party/mojo/src/mojo/public/dart/src/buffer.dart ('k') | third_party/mojo/src/mojo/public/dart/src/data_pipe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698