| Index: mojo/public/js/validator.js
|
| diff --git a/mojo/public/js/validator.js b/mojo/public/js/validator.js
|
| index 9f2b7cf4db141f3eab218b4e79ce89e69e9c4fa2..fee742d0c1b1c2761f99bd4494e587e5237965fd 100644
|
| --- a/mojo/public/js/validator.js
|
| +++ b/mojo/public/js/validator.js
|
| @@ -210,6 +210,27 @@ define("mojo/public/js/validator", [
|
| return validationError.NONE;
|
| };
|
|
|
| + Validator.prototype.validateMessageIsRequestWithoutResponse = function() {
|
| + if (this.message.isResponse() || this.message.expectsResponse()) {
|
| + return validationError.MESSAGE_HEADER_INVALID_FLAGS;
|
| + }
|
| + return validationError.NONE;
|
| + };
|
| +
|
| + Validator.prototype.validateMessageIsRequestExpectingResponse = function() {
|
| + if (this.message.isResponse() || !this.message.expectsResponse()) {
|
| + return validationError.MESSAGE_HEADER_INVALID_FLAGS;
|
| + }
|
| + return validationError.NONE;
|
| + };
|
| +
|
| + Validator.prototype.validateMessageIsResponse = function() {
|
| + if (this.message.expectsResponse() || !this.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.
|
|
|