Index: mojo/public/js/bindings/connection.js |
diff --git a/mojo/public/js/bindings/connection.js b/mojo/public/js/bindings/connection.js |
index ebf60adb7f8de5a94014d762db9c1ecbc0d8c356..03bb76811ec0bd9bcf8a8f891e339cf1ae4ce4b1 100644 |
--- a/mojo/public/js/bindings/connection.js |
+++ b/mojo/public/js/bindings/connection.js |
@@ -11,6 +11,15 @@ define("mojo/public/js/bindings/connection", [ |
this.remote = new remoteFactory(this.router_); |
this.local = new localFactory(this.remote); |
this.router_.setIncomingReceiver(this.local); |
+ |
+ var validateRequest = localFactory.prototype.validator; |
+ var validateResponse = remoteFactory.prototype.validator; |
+ var payloadValidators = []; |
+ if (validateRequest) |
+ payloadValidators.push(validateRequest); |
+ if (validateResponse) |
+ payloadValidators.push(validateResponse); |
+ this.router_.setPayloadValidators(payloadValidators); |
} |
Connection.prototype.close = function() { |