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

Issue 2084593005: Rationalize AddAwakable...() and RemoveAwakable...() methods. (Closed)

Created:
4 years, 6 months ago by viettrungluu
Modified:
4 years, 6 months ago
Reviewers:
vardhan
CC:
mojo-reviews_chromium.org, gregsimon, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Rationalize AddAwakable...() and RemoveAwakable...() methods. Despite the apparent size of this change, it's just one big make-work project. But it'll help preserve (what little is left of) my sanity. * Rearrange the order of parameters, so that the context always immediately follows the awakable pointer argument. * Give Dispatcher::AddAwakable() a |force| parameter, like everywhere else, and get rid of its AddAwakableUnconditional(). * Give all the RemoveAwakable() (and similar variants) methods in various places a |match_context| boolean parameter and a |context| parameter (used only if |match_context| is true), and get rid of RemoveAwakableWithContext() (and similar variants). * Change the behaviour of AddAwakable() when |force| is true, to also add when something is (currently) never-satisfiable. (Data pipe consumer/producers can sometimes go from "never"-satisfiable back to satisfiable due to a change of options.) R=vardhan@google.com BUG=#350 Committed: https://chromium.googlesource.com/external/mojo/+/8945984fcfe6f45ee825417a47e0d2d0451aee1d

Patch Set 1 #

Patch Set 2 : doh #

Unified diffs Side-by-side diffs Delta from patch set Stats (+603 lines, -732 lines) Patch
M mojo/edk/system/awakable_list.h View 1 chunk +7 lines, -3 lines 0 comments Download
M mojo/edk/system/awakable_list.cc View 1 chunk +7 lines, -19 lines 0 comments Download
M mojo/edk/system/awakable_list_unittest.cc View 30 chunks +50 lines, -50 lines 0 comments Download
M mojo/edk/system/channel_unittest.cc View 3 chunks +3 lines, -3 lines 0 comments Download
M mojo/edk/system/core.cc View 4 chunks +4 lines, -5 lines 0 comments Download
M mojo/edk/system/core_test_base.h View 3 chunks +0 lines, -3 lines 0 comments Download
M mojo/edk/system/core_test_base.cc View 5 chunks +5 lines, -25 lines 0 comments Download
M mojo/edk/system/data_pipe.h View 2 chunks +10 lines, -12 lines 0 comments Download
M mojo/edk/system/data_pipe.cc View 1 4 chunks +24 lines, -36 lines 0 comments Download
M mojo/edk/system/data_pipe_consumer_dispatcher.h View 1 chunk +5 lines, -7 lines 0 comments Download
M mojo/edk/system/data_pipe_consumer_dispatcher.cc View 1 chunk +6 lines, -12 lines 0 comments Download
M mojo/edk/system/data_pipe_impl_unittest.cc View 95 chunks +179 lines, -173 lines 0 comments Download
M mojo/edk/system/data_pipe_producer_dispatcher.h View 1 chunk +5 lines, -7 lines 0 comments Download
M mojo/edk/system/data_pipe_producer_dispatcher.cc View 1 chunk +6 lines, -12 lines 0 comments Download
M mojo/edk/system/dispatcher.h View 3 chunks +27 lines, -30 lines 0 comments Download
M mojo/edk/system/dispatcher.cc View 6 chunks +12 lines, -47 lines 0 comments Download
M mojo/edk/system/dispatcher_unittest.cc View 5 chunks +9 lines, -9 lines 0 comments Download
M mojo/edk/system/ipc_support_unittest.cc View 4 chunks +8 lines, -8 lines 0 comments Download
M mojo/edk/system/local_message_pipe_endpoint.h View 1 chunk +5 lines, -6 lines 0 comments Download
M mojo/edk/system/local_message_pipe_endpoint.cc View 2 chunks +10 lines, -15 lines 0 comments Download
M mojo/edk/system/message_pipe.h View 1 chunk +4 lines, -6 lines 0 comments Download
M mojo/edk/system/message_pipe.cc View 1 chunk +7 lines, -16 lines 0 comments Download
M mojo/edk/system/message_pipe_dispatcher.h View 1 chunk +5 lines, -7 lines 0 comments Download
M mojo/edk/system/message_pipe_dispatcher.cc View 1 chunk +6 lines, -12 lines 0 comments Download
M mojo/edk/system/message_pipe_dispatcher_unittest.cc View 16 chunks +25 lines, -21 lines 0 comments Download
M mojo/edk/system/message_pipe_endpoint.h View 1 chunk +5 lines, -6 lines 0 comments Download
M mojo/edk/system/message_pipe_endpoint.cc View 2 chunks +5 lines, -12 lines 0 comments Download
M mojo/edk/system/message_pipe_test_utils.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M mojo/edk/system/message_pipe_unittest.cc View 13 chunks +34 lines, -32 lines 0 comments Download
M mojo/edk/system/remote_data_pipe_impl_unittest.cc View 12 chunks +24 lines, -24 lines 0 comments Download
M mojo/edk/system/remote_message_pipe_unittest.cc View 36 chunks +57 lines, -57 lines 0 comments Download
M mojo/edk/system/simple_dispatcher.h View 1 chunk +5 lines, -7 lines 0 comments Download
M mojo/edk/system/simple_dispatcher.cc View 2 chunks +10 lines, -15 lines 0 comments Download
M mojo/edk/system/simple_dispatcher_unittest.cc View 19 chunks +22 lines, -22 lines 0 comments Download
M mojo/edk/system/wait_set_dispatcher.cc View 5 chunks +7 lines, -8 lines 0 comments Download
M mojo/edk/system/waiter_test_utils.cc View 1 chunk +3 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 7 (3 generated)
viettrungluu
4 years, 6 months ago (2016-06-21 17:47:53 UTC) #1
viettrungluu
ping
4 years, 6 months ago (2016-06-22 15:21:24 UTC) #4
vardhan
lgtm
4 years, 6 months ago (2016-06-22 16:07:20 UTC) #5
viettrungluu
4 years, 6 months ago (2016-06-22 16:16:55 UTC) #7
Message was sent while issue was closed.
Committed patchset #2 (id:20001) manually as
8945984fcfe6f45ee825417a47e0d2d0451aee1d (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698