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

Unified Diff: mojo/public/js/bindings/connection.js

Issue 637373002: Mojo JS bindings: simplify mojo.connectToService() usage - Part 2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed the mojo_internals module, made Connection localFactory optional Created 6 years, 2 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/mojo_apps.gypi ('k') | mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/js/bindings/connection.js
diff --git a/mojo/public/js/bindings/connection.js b/mojo/public/js/bindings/connection.js
index 01e33e95cd25743accd0719a5088819e61ef1fcf..7d92e8c76d9c126fd5278d4fcd3fd57d9674ecdf 100644
--- a/mojo/public/js/bindings/connection.js
+++ b/mojo/public/js/bindings/connection.js
@@ -13,11 +13,11 @@ define("mojo/public/js/bindings/connection", [
routerFactory = router.Router;
this.router_ = new routerFactory(handle, connectorFactory);
this.remote = new remoteFactory(this.router_);
- this.local = new localFactory(this.remote);
+ this.local = localFactory && new localFactory(this.remote);
this.router_.setIncomingReceiver(this.local);
// Validate incoming messages: remote responses and local requests.
- var validateRequest = localFactory.prototype.validator;
+ var validateRequest = localFactory && localFactory.prototype.validator;
var validateResponse = remoteFactory.prototype.validator;
var payloadValidators = [];
if (validateRequest)
« no previous file with comments | « mojo/mojo_apps.gypi ('k') | mojo/public/tools/bindings/generators/js_templates/interface_definition.tmpl » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698