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

Issue 420143003: mojo: shell::Context should outlive the shell MessageLoop (Closed)

Created:
6 years, 4 months ago by tim (not reviewing)
Modified:
6 years, 4 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org
Project:
chromium
Visibility:
Public.

Description

mojo: shell::Context should outlive the shell MessageLoop Make sure tests and mojo_mains all work the same way by handing control of MessageLoops in test to ShellTest{Base, Helper}. This ensures Applications that live as part of the shell (ViewManager) can rely on MessageLoop destruction happening first (before their own destruction) for cleaning up, similar to how this typically works for real apps (mojo_main_{chromium, standalone}. BUG=394477 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=286370

Patch Set 1 : #

Patch Set 2 : rebase #

Total comments: 4

Patch Set 3 : review #

Total comments: 4

Patch Set 4 : review 2 #

Total comments: 2

Patch Set 5 : fix + verify android #

Unified diffs Side-by-side diffs Delta from patch set Stats (+59 lines, -45 lines) Patch
M mojo/services/public/cpp/view_manager/tests/view_manager_unittest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M mojo/services/view_manager/view_manager_unittest.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M mojo/services/window_manager/window_manager_api_unittest.cc View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/shell/android/mojo_main.cc View 1 2 3 4 2 chunks +8 lines, -5 lines 0 comments Download
M mojo/shell/child_process_host_unittest.cc View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M mojo/shell/context.h View 2 chunks +3 lines, -2 lines 0 comments Download
M mojo/shell/context.cc View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download
M mojo/shell/desktop/mojo_main.cc View 1 2 3 1 chunk +25 lines, -22 lines 0 comments Download
M mojo/shell/dynamic_service_loader_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M mojo/shell/in_process_dynamic_service_runner_unittest.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M mojo/shell/shell_test_base.h View 1 chunk +1 line, -1 line 0 comments Download
M mojo/shell/shell_test_base.cc View 1 chunk +1 line, -0 lines 0 comments Download
M mojo/shell/shell_test_helper.h View 1 2 1 chunk +3 lines, -2 lines 0 comments Download
M mojo/shell/shell_test_helper.cc View 1 2 1 chunk +4 lines, -4 lines 0 comments Download

Messages

Total messages: 15 (0 generated)
tim (not reviewing)
Some context for this: https://docs.google.com/a/chromium.org/document/d/1tKZw3cnnGEuoOD1gYLmPQtqYHNR0swLQLLhm7fV7jXw/edit
6 years, 4 months ago (2014-07-28 16:44:04 UTC) #1
jamesr
lgtm https://codereview.chromium.org/420143003/diff/70001/mojo/shell/child_process_host_unittest.cc File mojo/shell/child_process_host_unittest.cc (right): https://codereview.chromium.org/420143003/diff/70001/mojo/shell/child_process_host_unittest.cc#newcode40 mojo/shell/child_process_host_unittest.cc:40: Context context; any reason not to move this ...
6 years, 4 months ago (2014-07-28 20:11:27 UTC) #2
tim (not reviewing)
https://codereview.chromium.org/420143003/diff/70001/mojo/shell/child_process_host_unittest.cc File mojo/shell/child_process_host_unittest.cc (right): https://codereview.chromium.org/420143003/diff/70001/mojo/shell/child_process_host_unittest.cc#newcode40 mojo/shell/child_process_host_unittest.cc:40: Context context; On 2014/07/28 20:11:27, jamesr wrote: > any ...
6 years, 4 months ago (2014-07-28 22:16:37 UTC) #3
darin (slow to review)
https://codereview.chromium.org/420143003/diff/90001/mojo/shell/context.cc File mojo/shell/context.cc (right): https://codereview.chromium.org/420143003/diff/90001/mojo/shell/context.cc#newcode87 mojo/shell/context.cc:87: DCHECK(!base::MessageLoop::current()); perhaps the dtor should have a similar assertion? ...
6 years, 4 months ago (2014-07-28 23:02:13 UTC) #4
tim (not reviewing)
https://codereview.chromium.org/420143003/diff/90001/mojo/shell/context.cc File mojo/shell/context.cc (right): https://codereview.chromium.org/420143003/diff/90001/mojo/shell/context.cc#newcode87 mojo/shell/context.cc:87: DCHECK(!base::MessageLoop::current()); On 2014/07/28 23:02:12, darin wrote: > perhaps the ...
6 years, 4 months ago (2014-07-29 00:54:57 UTC) #5
tim (not reviewing)
The CQ bit was checked by tim@chromium.org
6 years, 4 months ago (2014-07-29 05:29:43 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tim@chromium.org/420143003/110001
6 years, 4 months ago (2014-07-29 05:31:52 UTC) #7
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_clang_dbg on tryserver.chromium.linux ...
6 years, 4 months ago (2014-07-29 06:14:13 UTC) #8
jamesr
https://codereview.chromium.org/420143003/diff/110001/mojo/shell/android/mojo_main.cc File mojo/shell/android/mojo_main.cc (right): https://codereview.chromium.org/420143003/diff/110001/mojo/shell/android/mojo_main.cc#newcode40 mojo/shell/android/mojo_main.cc:40: shell_context->set_ui_loop(g_java_message_loop.Get().get()); maybe you want g_context.Get()-> here?
6 years, 4 months ago (2014-07-29 06:17:34 UTC) #9
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-07-29 06:20:28 UTC) #10
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg/builds/781)
6 years, 4 months ago (2014-07-29 06:20:29 UTC) #11
tim (not reviewing)
https://codereview.chromium.org/420143003/diff/110001/mojo/shell/android/mojo_main.cc File mojo/shell/android/mojo_main.cc (right): https://codereview.chromium.org/420143003/diff/110001/mojo/shell/android/mojo_main.cc#newcode40 mojo/shell/android/mojo_main.cc:40: shell_context->set_ui_loop(g_java_message_loop.Get().get()); On 2014/07/29 06:17:34, jamesr wrote: > maybe you ...
6 years, 4 months ago (2014-07-29 20:48:43 UTC) #12
tim (not reviewing)
The CQ bit was checked by tim@chromium.org
6 years, 4 months ago (2014-07-29 21:12:30 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tim@chromium.org/420143003/130001
6 years, 4 months ago (2014-07-29 21:13:47 UTC) #14
commit-bot: I haz the power
6 years, 4 months ago (2014-07-30 01:20:54 UTC) #15
Message was sent while issue was closed.
Change committed as 286370

Powered by Google App Engine
This is Rietveld 408576698