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

Issue 1819463002: Make mojo::Callback safe to copy across threads. (Closed)

Created:
4 years, 9 months ago by Anand Mistry (off Chromium)
Modified:
4 years, 9 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make mojo::Callback safe to copy across threads and destroy on any thread. This brings the behaviour of mojo::Callback close to that of base::Callback. BUG=595939 Committed: https://crrev.com/314a150a7a17639873137ba079a4a26785242273 Cr-Commit-Position: refs/heads/master@{#382349}

Patch Set 1 #

Patch Set 2 : Take 2 #

Patch Set 3 : Fix destruction. #

Total comments: 16

Patch Set 4 : Review comments. #

Patch Set 5 : stuff #

Total comments: 2

Patch Set 6 : review comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+99 lines, -32 lines) Patch
M mojo/public/cpp/bindings/callback.h View 1 2 3 4 5 chunks +19 lines, -8 lines 0 comments Download
M mojo/public/cpp/bindings/lib/interface_endpoint_client.cc View 1 2 3 4 5 5 chunks +32 lines, -11 lines 0 comments Download
M mojo/public/cpp/bindings/lib/router.cc View 1 2 3 4 5 3 chunks +33 lines, -6 lines 0 comments Download
M mojo/public/cpp/bindings/message.h View 1 2 3 4 5 1 chunk +5 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/tests/binding_callback_unittest.cc View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M mojo/public/tools/bindings/generators/cpp_templates/interface_definition.tmpl View 1 2 3 4 5 1 chunk +9 lines, -6 lines 0 comments Download

Messages

Total messages: 19 (6 generated)
Anand Mistry (off Chromium)
WDYT?
4 years, 9 months ago (2016-03-18 20:52:42 UTC) #3
Ken Rockot(use gerrit already)
lgtm
4 years, 9 months ago (2016-03-18 21:56:23 UTC) #4
Anand Mistry (off Chromium)
sam: If you have any insights on this issue.
4 years, 9 months ago (2016-03-18 22:05:12 UTC) #6
yzshen1
https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/lib/router.cc File mojo/public/cpp/bindings/lib/router.cc (right): https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/lib/router.cc#newcode26 mojo/public/cpp/bindings/lib/router.cc:26: const std::string message) { "const &"? https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/lib/router.cc#newcode28 mojo/public/cpp/bindings/lib/router.cc:28: NOTREACHED() ...
4 years, 9 months ago (2016-03-18 23:47:04 UTC) #7
Anand Mistry (off Chromium)
https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/lib/router.cc File mojo/public/cpp/bindings/lib/router.cc (right): https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/lib/router.cc#newcode26 mojo/public/cpp/bindings/lib/router.cc:26: const std::string message) { On 2016/03/18 23:47:04, yzshen1 wrote: ...
4 years, 9 months ago (2016-03-19 01:02:14 UTC) #8
Sam McNally
lgtm https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/callback.h File mojo/public/cpp/bindings/callback.h (right): https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/callback.h#newcode134 mojo/public/cpp/bindings/callback.h:134: friend class base::RefCountedThreadSafe<RunnableHolder>; Friends before destructors.
4 years, 9 months ago (2016-03-19 01:03:53 UTC) #9
Anand Mistry (off Chromium)
https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/callback.h File mojo/public/cpp/bindings/callback.h (right): https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/callback.h#newcode134 mojo/public/cpp/bindings/callback.h:134: friend class base::RefCountedThreadSafe<RunnableHolder>; On 2016/03/19 01:03:53, Sam McNally wrote: ...
4 years, 9 months ago (2016-03-19 01:09:36 UTC) #10
yzshen1
https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/lib/router.cc File mojo/public/cpp/bindings/lib/router.cc (right): https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/lib/router.cc#newcode46 mojo/public/cpp/bindings/lib/router.cc:46: router_->RaiseError(); On 2016/03/19 01:02:13, Anand Mistry wrote: > On ...
4 years, 9 months ago (2016-03-19 01:29:54 UTC) #11
Anand Mistry (off Chromium)
https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/lib/router.cc File mojo/public/cpp/bindings/lib/router.cc (right): https://codereview.chromium.org/1819463002/diff/40001/mojo/public/cpp/bindings/lib/router.cc#newcode46 mojo/public/cpp/bindings/lib/router.cc:46: router_->RaiseError(); On 2016/03/19 01:29:54, yzshen1 wrote: > On 2016/03/19 ...
4 years, 9 months ago (2016-03-19 03:56:54 UTC) #12
yzshen1
lgtm
4 years, 9 months ago (2016-03-21 05:42:19 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1819463002/100001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1819463002/100001
4 years, 9 months ago (2016-03-21 16:57:30 UTC) #16
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 9 months ago (2016-03-21 19:16:50 UTC) #17
commit-bot: I haz the power
4 years, 9 months ago (2016-03-21 19:17:50 UTC) #19
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/314a150a7a17639873137ba079a4a26785242273
Cr-Commit-Position: refs/heads/master@{#382349}

Powered by Google App Engine
This is Rietveld 408576698