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

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

Issue 2676443005: Add interface versioning. Methods queryVersion and requireVersion. (Closed)
Patch Set: Created 3 years, 10 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: mojo/public/js/validator.js
diff --git a/mojo/public/js/validator.js b/mojo/public/js/validator.js
index 9f2b7cf4db141f3eab218b4e79ce89e69e9c4fa2..e286b8c11337c6dadd31618320c33e7d5e18f621 100644
--- a/mojo/public/js/validator.js
+++ b/mojo/public/js/validator.js
@@ -210,6 +210,14 @@ define("mojo/public/js/validator", [
return validationError.NONE;
};
+ Validator.prototype.validateMessageIsResponse = function
+ validateMessageIsResponse(message) {
+ if (message.expectsResponse() || !message.isResponse()){
+ return validationError.MESSAGE_HEADER_INVALID_FLAGS;
+ }
+ return validationError.NONE;
+ }
+
// Returns the message.buffer relative offset this pointer "points to",
// NULL_MOJO_POINTER if the pointer represents a null, or JS null if the
// pointer's value is not valid.

Powered by Google App Engine
This is Rietveld 408576698