| Index: third_party/mojo/src/mojo/public/js/connection.js
|
| diff --git a/third_party/mojo/src/mojo/public/js/connection.js b/third_party/mojo/src/mojo/public/js/connection.js
|
| index 4a7a8b8883db9e7455b46e4c6f8003657e25ea87..223e71128911ea8ddb329a1cbdfea3b5185df07a 100644
|
| --- a/third_party/mojo/src/mojo/public/js/connection.js
|
| +++ b/third_party/mojo/src/mojo/public/js/connection.js
|
| @@ -140,13 +140,10 @@
|
| }
|
|
|
| // Return a handle for a message pipe that's connected to a stub for
|
| - // localInterface. Used by generated code for outgoing interface
|
| - // parameters: the caller is given the generated stub via
|
| - // |stubCallback(stub)| and the generated code sends the handle
|
| - // returned by this function. The caller is responsible for managing
|
| - // the lifetime of the stub and for setting it's implementation
|
| - // delegate with: StubBindings(stub).delegate = myImpl;
|
| - function bindImpl(stubCallback, localInterface) {
|
| + // localInterface. The stub delegates to impl. Used by generated code for
|
| + // outgoing interface parameters: the caller specifies impl, and the generated
|
| + // code sends the handle returned by this function.
|
| + function bindImpl(impl, localInterface) {
|
| var messagePipe = core.createMessagePipe();
|
| if (messagePipe.result != core.RESULT_OK)
|
| throw new Error("createMessagePipe failed " + messagePipe.result);
|
| @@ -155,8 +152,8 @@
|
| var router = new Router(messagePipe.handle0);
|
| var connection = new BaseConnection(stub, undefined, router);
|
| StubBindings(stub).connection = connection;
|
| - if (stubCallback)
|
| - stubCallback(stub);
|
| + if (impl)
|
| + StubBindings(stub).delegate = impl;
|
|
|
| return messagePipe.handle1;
|
| }
|
|
|