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

Unified Diff: mojo/public/js/interface_types.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/constants.cc ('k') | mojo/public/js/lib/control_message_handler.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/interface_types.js
diff --git a/mojo/public/js/interface_types.js b/mojo/public/js/interface_types.js
index 01ea2d1dd466a76f2f5ccb1259efe0eac00a1677..e8ed37ae64a1ff78f415ddd25f55c738098485be 100644
--- a/mojo/public/js/interface_types.js
+++ b/mojo/public/js/interface_types.js
@@ -6,6 +6,11 @@ define("mojo/public/js/interface_types", [
"mojo/public/js/core",
], function(core) {
+ // Constants ----------------------------------------------------------------
+ var kInterfaceIdNamespaceMask = 0x80000000;
+ var kMasterInterfaceId = 0x00000000;
+ var kInvalidInterfaceId = 0xFFFFFFFF;
+
// ---------------------------------------------------------------------------
function InterfacePtrInfo(handle, version) {
@@ -44,9 +49,22 @@ define("mojo/public/js/interface_types", [
this.handle = null;
};
+ function isMasterInterfaceId(interfaceId) {
+ return interfaceId === kMasterInterfaceId;
+ }
+
+ function isValidInterfaceId(interfaceId) {
+ return interfaceId !== kInvalidInterfaceId;
+ }
+
var exports = {};
exports.InterfacePtrInfo = InterfacePtrInfo;
exports.InterfaceRequest = InterfaceRequest;
+ exports.isMasterInterfaceId = isMasterInterfaceId;
+ exports.isValidInterfaceId = isValidInterfaceId;
+ exports.kInvalidInterfaceId = kInvalidInterfaceId;
+ exports.kMasterInterfaceId = kMasterInterfaceId;
+ exports.kInterfaceIdNamespaceMask = kInterfaceIdNamespaceMask;
return exports;
});
« no previous file with comments | « mojo/public/js/constants.cc ('k') | mojo/public/js/lib/control_message_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698