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

Issue 2487803002: Mojo C++ Bindings: Allow callbacks to own their InterfacePtr (Closed)

Created:
4 years, 1 month ago by Ken Rockot(use gerrit already)
Modified:
4 years, 1 month ago
Reviewers:
yzshen1
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo C++ Bindings: Allow callbacks to own their InterfacePtr This changes endpoint error handling slightly to enable response callbacks to own the endpoint which is waiting for the response. The use case is that sometimes a caller wants to make a single interface call which receives a response, and there's no good candidate object to own and keep the InterfacePtr alive for the extent of the call. If the Ptr isn't kept alive, the response will never be received. In such cases, it's natural to want the Ptr to live only as long as the pending request. See the image_decoder client library for a concrete example: https://codereview.chromium.org/2475543003 Specifically image_decoder::Decode(). BUG=654986 R=yzshen@chromium.org Committed: https://crrev.com/fddb451107a7468066fd17996e1920d1ee3289a4 Cr-Commit-Position: refs/heads/master@{#430749}

Patch Set 1 #

Patch Set 2 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -6 lines) Patch
M mojo/public/cpp/bindings/lib/interface_endpoint_client.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/lib/router.cc View 1 chunk +5 lines, -3 lines 0 comments Download
M mojo/public/cpp/bindings/tests/interface_ptr_unittest.cc View 1 1 chunk +19 lines, -0 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 13 (8 generated)
Ken Rockot(use gerrit already)
PTAL, thanks!
4 years, 1 month ago (2016-11-08 21:58:00 UTC) #5
yzshen1
lgtm
4 years, 1 month ago (2016-11-08 23:07:31 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2487803002/20001
4 years, 1 month ago (2016-11-08 23:08:49 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-08 23:16:23 UTC) #11
commit-bot: I haz the power
4 years, 1 month ago (2016-11-08 23:21:44 UTC) #13
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/fddb451107a7468066fd17996e1920d1ee3289a4
Cr-Commit-Position: refs/heads/master@{#430749}

Powered by Google App Engine
This is Rietveld 408576698