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

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

Issue 1127293003: Update mojo sdk to rev f84766d3b6420b7cf6a113d9d65d73cb5fe18d90 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: formatting 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/js/codec.js
diff --git a/third_party/mojo/src/mojo/public/js/codec.js b/third_party/mojo/src/mojo/public/js/codec.js
index 4eec2c06891c68e81830650a6929139d2eb08d54..2930c59f274993cf5843c06a253a1f0187611745 100644
--- a/third_party/mojo/src/mojo/public/js/codec.js
+++ b/third_party/mojo/src/mojo/public/js/codec.js
@@ -390,9 +390,7 @@ define("mojo/public/js/codec", [
keys[i++] = key;
});
this.writeUint32(kStructHeaderSize + kMapStructPayloadSize);
- // TODO(yzshen): In order to work with other bindings which still interprets
- // the |version| field as |num_fields|, set it to version 2 for now.
- this.writeUint32(2); // version
+ this.writeUint32(0); // version
this.encodeArrayPointer(keyClass, keys);
this.encodeArrayPointer(valueClass, values);
}
@@ -465,9 +463,7 @@ define("mojo/public/js/codec", [
this.handles = [];
var encoder = this.createEncoder(kMessageHeaderSize);
encoder.writeUint32(kMessageHeaderSize);
- // TODO(yzshen): In order to work with other bindings which still interprets
- // the |version| field as |num_fields|, set it to version 2 for now.
- encoder.writeUint32(2); // version.
+ encoder.writeUint32(0); // version.
encoder.writeUint32(messageName);
encoder.writeUint32(0); // flags.
}
@@ -503,9 +499,7 @@ define("mojo/public/js/codec", [
this.handles = [];
var encoder = this.createEncoder(kMessageWithRequestIDHeaderSize);
encoder.writeUint32(kMessageWithRequestIDHeaderSize);
- // TODO(yzshen): In order to work with other bindings which still interprets
- // the |version| field as |num_fields|, set it to version 3 for now.
- encoder.writeUint32(3); // version.
+ encoder.writeUint32(1); // version.
encoder.writeUint32(messageName);
encoder.writeUint32(flags);
encoder.writeUint64(requestID);
@@ -526,7 +520,7 @@ define("mojo/public/js/codec", [
var version = this.decoder.readUint32();
this.messageName = this.decoder.readUint32();
this.flags = this.decoder.readUint32();
- if (version >= 3)
+ if (version >= 1)
this.requestID = this.decoder.readUint64();
this.decoder.skip(messageHeaderSize - this.decoder.next);
}

Powered by Google App Engine
This is Rietveld 408576698