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

Issue 2741033003: Mojo EDK: Introduce MojoQueryHandleSignalsState API (Closed)

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

Description

Mojo EDK: Introduce MojoQueryHandleSignalsState API The only reliable way to inquire about handle signals now is to MojoWait (for e.g. 0 deadline). As a precursor to removing the wait APIs in favor of watchers, we need to retain the ability to efficiently query a handle's signals state. Rather than trying to retrofit the watcher APIs to support this use case in similar fashion to the wait APIs, this adds an API explicitly for the purpose of querying signals state. Adds a corresponding method to the C++ mojo::Handle and moves the EDK's internal HandleSignalsState helper class to mojo/public/cpp/system, adding some convenient accessors. Also introduces the API to the JS and Java libraries, and replaces any 0-deadline waits in those languages with usage of this new API. Because waitMany is not used in these languages (except for tests which test waitMany...) it has been removed. wait() is unused in Java after this change, so it has also been removed. Finally, this moves several tests away from calling MojoWait directly, instead using a simplified Watcher-based wait implementation in MojoTestBase. BUG=700171 TBR=jam@chromium.org Review-Url: https://codereview.chromium.org/2741033003 Cr-Original-Commit-Position: refs/heads/master@{#457315} Committed: https://chromium.googlesource.com/chromium/src/+/853496a78ae997c2d8b80f3cd8fabf9423fb3361 Review-Url: https://codereview.chromium.org/2741033003 Cr-Commit-Position: refs/heads/master@{#457378} Committed: https://chromium.googlesource.com/chromium/src/+/c7949549ac0c42252c8b3f2c08d4cb34b65dc869

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : rebase #

Patch Set 4 : . #

Patch Set 5 : . #

Patch Set 6 : rebase #

Patch Set 7 : rebase #

Total comments: 8

Patch Set 8 : rebase & nits #

Patch Set 9 : rebase #

Patch Set 10 : fix stupid bad DCHECK #

Unified diffs Side-by-side diffs Delta from patch set Stats (+631 lines, -785 lines) Patch
M content/child/web_data_consumer_handle_impl.cc View 1 2 3 4 5 6 7 1 chunk +7 lines, -14 lines 0 comments Download
M mojo/android/javatests/src/org/chromium/mojo/HandleMock.java View 1 2 3 4 2 chunks +4 lines, -7 lines 0 comments Download
M mojo/android/javatests/src/org/chromium/mojo/bindings/RouterTest.java View 1 2 3 4 2 chunks +1 line, -4 lines 0 comments Download
M mojo/android/javatests/src/org/chromium/mojo/system/impl/CoreImplTest.java View 1 2 3 4 6 chunks +2 lines, -124 lines 0 comments Download
M mojo/android/system/core_impl.cc View 1 2 3 4 2 chunks +9 lines, -49 lines 0 comments Download
M mojo/android/system/src/org/chromium/mojo/system/impl/CoreImpl.java View 1 2 3 4 6 chunks +10 lines, -59 lines 0 comments Download
M mojo/android/system/src/org/chromium/mojo/system/impl/HandleBase.java View 1 2 3 4 2 chunks +4 lines, -5 lines 0 comments Download
M mojo/edk/embedder/entrypoints.cc View 2 chunks +7 lines, -0 lines 0 comments Download
M mojo/edk/js/core.cc View 1 2 3 4 2 chunks +15 lines, -0 lines 0 comments Download
M mojo/edk/system/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/edk/system/awakable_list.h View 1 chunk +1 line, -1 line 0 comments Download
M mojo/edk/system/awakable_list.cc View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/edk/system/core.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/edk/system/core.cc View 1 2 1 chunk +11 lines, -0 lines 0 comments Download
M mojo/edk/system/data_pipe_unittest.cc View 1 2 51 chunks +78 lines, -145 lines 0 comments Download
M mojo/edk/system/handle_signals_state.h View 1 chunk +3 lines, -39 lines 0 comments Download
M mojo/edk/system/message_pipe_perftest.cc View 1 2 chunks +2 lines, -5 lines 0 comments Download
M mojo/edk/system/message_pipe_unittest.cc View 18 chunks +35 lines, -58 lines 0 comments Download
M mojo/edk/system/multiprocess_message_pipe_unittest.cc View 25 chunks +28 lines, -56 lines 0 comments Download
A mojo/edk/system/signals_unittest.cc View 1 chunk +76 lines, -0 lines 0 comments Download
M mojo/edk/test/mojo_test_base.h View 2 chunks +8 lines, -2 lines 0 comments Download
M mojo/edk/test/mojo_test_base.cc View 1 2 3 4 5 6 7 8 9 8 chunks +120 lines, -13 lines 0 comments Download
M mojo/public/c/system/functions.h View 1 chunk +15 lines, -0 lines 0 comments Download
M mojo/public/c/system/tests/core_unittest.cc View 1 2 6 chunks +11 lines, -23 lines 0 comments Download
M mojo/public/c/system/tests/core_unittest_pure_c.c View 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/public/c/system/thunks.h View 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/public/c/system/thunks.cc View 1 chunk +7 lines, -0 lines 0 comments Download
M mojo/public/cpp/system/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/public/cpp/system/handle.h View 1 2 3 4 5 6 7 2 chunks +9 lines, -0 lines 0 comments Download
A mojo/public/cpp/system/handle_signals_state.h View 1 2 3 4 5 6 7 1 chunk +83 lines, -0 lines 0 comments Download
M mojo/public/cpp/system/tests/BUILD.gn View 1 chunk +1 line, -0 lines 0 comments Download
A mojo/public/cpp/system/tests/handle_signals_state_unittest.cc View 1 chunk +42 lines, -0 lines 0 comments Download
M mojo/public/java/system/src/org/chromium/mojo/system/Core.java View 1 2 3 4 2 chunks +0 lines, -138 lines 0 comments Download
M mojo/public/java/system/src/org/chromium/mojo/system/Handle.java View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M mojo/public/java/system/src/org/chromium/mojo/system/InvalidHandle.java View 1 2 3 4 2 chunks +3 lines, -4 lines 0 comments Download
M mojo/public/js/core.js View 1 2 3 4 1 chunk +12 lines, -0 lines 0 comments Download
M mojo/public/js/tests/core_unittest.js View 1 2 3 4 2 chunks +14 lines, -35 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 67 (54 generated)
Ken Rockot(use gerrit already)
Another one for consideration at your leisure :) Most of the churn here is just ...
3 years, 9 months ago (2017-03-13 22:18:19 UTC) #29
yzshen1
LGTM with a few nits. https://codereview.chromium.org/2741033003/diff/120001/content/child/web_data_consumer_handle_impl.cc File content/child/web_data_consumer_handle_impl.cc (right): https://codereview.chromium.org/2741033003/diff/120001/content/child/web_data_consumer_handle_impl.cc#newcode69 content/child/web_data_consumer_handle_impl.cc:69: else if (state.never_readable()) nit: ...
3 years, 9 months ago (2017-03-14 18:20:45 UTC) #32
Ken Rockot(use gerrit already)
Thanks! TBRing jam@ for trivial content change https://codereview.chromium.org/2741033003/diff/120001/content/child/web_data_consumer_handle_impl.cc File content/child/web_data_consumer_handle_impl.cc (right): https://codereview.chromium.org/2741033003/diff/120001/content/child/web_data_consumer_handle_impl.cc#newcode69 content/child/web_data_consumer_handle_impl.cc:69: else if ...
3 years, 9 months ago (2017-03-14 19:16:20 UTC) #36
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/2741033003/160001
3 years, 9 months ago (2017-03-16 02:11:27 UTC) #45
commit-bot: I haz the power
Committed patchset #9 (id:160001) as https://chromium.googlesource.com/chromium/src/+/853496a78ae997c2d8b80f3cd8fabf9423fb3361
3 years, 9 months ago (2017-03-16 02:19:30 UTC) #48
tzik
A revert of this CL (patchset #9 id:160001) has been created in https://codereview.chromium.org/2750273002/ by tzik@chromium.org. ...
3 years, 9 months ago (2017-03-16 03:57:26 UTC) #49
Ken Rockot(use gerrit already)
Doh. Thanks for reverting. It is immediately obvious to me that I accidentally left in ...
3 years, 9 months ago (2017-03-16 04:07:19 UTC) #50
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/2741033003/180001
3 years, 9 months ago (2017-03-16 04:18:14 UTC) #56
commit-bot: I haz the power
Try jobs failed on following builders: cast_shell_linux on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/cast_shell_linux/builds/327930)
3 years, 9 months ago (2017-03-16 04:54:38 UTC) #58
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/2741033003/180001
3 years, 9 months ago (2017-03-16 04:57:50 UTC) #60
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/408056)
3 years, 9 months ago (2017-03-16 05:31:41 UTC) #62
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/2741033003/180001
3 years, 9 months ago (2017-03-16 06:38:40 UTC) #64
commit-bot: I haz the power
3 years, 9 months ago (2017-03-16 09:04:59 UTC) #67
Message was sent while issue was closed.
Committed patchset #10 (id:180001) as
https://chromium.googlesource.com/chromium/src/+/c7949549ac0c42252c8b3f2c08d4...

Powered by Google App Engine
This is Rietveld 408576698