| 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.
|
|
|