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

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

Issue 2744963002: Introduce InterfaceEndpointClient(IEC), InterfaceEndpointHandle and (Closed)
Patch Set: Throw the error with the string being the stack trace needed to debug layouts which don't output an… Created 3 years, 9 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
« no previous file with comments | « mojo/public/js/bindings.js ('k') | mojo/public/js/connector.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/codec.js
diff --git a/mojo/public/js/codec.js b/mojo/public/js/codec.js
index ff5d31a08e5fef423d1a2f2230377bbdf8b8d8ec..ce58a8cfd4aea874d6b752d9f8efe47f28268037 100644
--- a/mojo/public/js/codec.js
+++ b/mojo/public/js/codec.js
@@ -453,6 +453,10 @@ define("mojo/public/js/codec", [
return this.buffer.getUint32(kMessageFlagsOffset);
};
+ Message.prototype.getInterfaceId = function() {
+ return this.buffer.getUint32(kMessageInterfaceIdOffset);
+ };
+
Message.prototype.isResponse = function() {
return (this.getFlags() & kMessageIsResponse) != 0;
};
@@ -466,6 +470,10 @@ define("mojo/public/js/codec", [
this.buffer.setUint64(kMessageRequestIDOffset, requestID);
};
+ Message.prototype.setInterfaceId = function(interfaceId) {
+ this.buffer.setUint32(kMessageInterfaceIdOffset, interfaceId);
+ };
+
// MessageBuilder -----------------------------------------------------------
@@ -537,10 +545,6 @@ define("mojo/public/js/codec", [
this.payloadSize = message.buffer.byteLength - messageHeaderSize;
var version = this.decoder.readUint32();
var interface_id = this.decoder.readUint32();
- if (interface_id != 0) {
- throw new Error("Receiving non-zero interface ID. Associated interfaces " +
- "are not yet supported.");
- }
this.messageName = this.decoder.readUint32();
this.flags = this.decoder.readUint32();
// Skip the padding.
« no previous file with comments | « mojo/public/js/bindings.js ('k') | mojo/public/js/connector.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698