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

Unified Diff: third_party/mojo/src/mojo/public/js/connection.js

Issue 890843003: Revert of Update mojo sdk to rev 8af2ccff2eee4bfca1043015abee30482a030b30 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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;
}

Powered by Google App Engine
This is Rietveld 408576698