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

Unified Diff: third_party/mojo/src/mojo/public/python/mojo_bindings/reflection.py

Issue 975973002: Update mojo sdk to rev f68e697e389943cd9bf9652397312280e96b127a (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: shake fist at msvc 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/python/mojo_bindings/reflection.py
diff --git a/third_party/mojo/src/mojo/public/python/mojo_bindings/reflection.py b/third_party/mojo/src/mojo/public/python/mojo_bindings/reflection.py
index cec05faec5286c2cad81ea224723b9fa61c38a65..e41601a6d0c8960e06e0049f94fbe0d28d7c2fe1 100644
--- a/third_party/mojo/src/mojo/public/python/mojo_bindings/reflection.py
+++ b/third_party/mojo/src/mojo/public/python/mojo_bindings/reflection.py
@@ -534,6 +534,7 @@ def _StubAccept(methods):
payload.data, payload.handles)).AsDict()
response = getattr(self.impl, method.name)(**parameters)
if header.expects_response:
+ @promise.async
def SendResponse(response):
if isinstance(response, dict):
response_message = _GetMessage(method,
@@ -544,8 +545,8 @@ def _StubAccept(methods):
messaging.MESSAGE_IS_RESPONSE_FLAG,
response)
response_message.header.request_id = header.request_id
- responder.Accept(response_message)
- p = promise.Promise.Resolve(response).Then(SendResponse)
+ return responder.Accept(response_message)
+ p = SendResponse(response)
if self.impl.manager:
# Close the connection in case of error.
p.Catch(lambda _: self.impl.manager.Close())

Powered by Google App Engine
This is Rietveld 408576698