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

Issue 2354333002: Remove calls to MessageLoop(ForUI|ForIO)::Run/RunUntilIdle. (Closed)

Created:
4 years, 2 months ago by fdoray
Modified:
4 years, 2 months ago
CC:
chromium-reviews, cbentzel+watch_chromium.org, alemate+watch_chromium.org, achuith+watch_chromium.org, gavinp+memory_chromium.org, rlp+watch_chromium.org, rouslan+spell_chromium.org, oshima+watch_chromium.org, groby+spellwatch_chromium.org, davemoore+watch_chromium.org, sdefresne+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Remove calls to MessageLoop(ForUI|ForIO)::Run/RunUntilIdle. This CL makes the following replacements: 1. base::MessageLoopForUIorIO::current()->Run()/RunUntilIdle(); becomes // This ASSERT_TRUE replaces the DCHECK in // MessageLoopForUIorIO::current(). ASSERT_TRUE(base::MessageLoopForUIorIO::IsCurrent()); base::RunLoop().Run()/RunUntilIdle(); 2. message_loop_for_ui_or_io.Run()/RunUntilIdle(); becomes // The ASSERT_TRUE is present only if it isn't obvious that // the current thread runs a MessageLoopForUIorIO (e.g. // because it isn't instantiated in the current file). ASSERT_TRUE(base::MessageLoopForUIorIO::IsCurrent()); base::RunLoop().Run()/RunUntilIdle(); BUG=616447 Committed: https://crrev.com/c5e45f6b0a71c2a174bea1219f9a6709191fde50 Cr-Commit-Position: refs/heads/master@{#420342}

Patch Set 1 #

Patch Set 2 : self-review #

Patch Set 3 : self-review #

Total comments: 4

Patch Set 4 : CR gab/groby #8-9 #

Total comments: 5

Patch Set 5 : CR groby #15 EXPECT -> ASSERT #

Patch Set 6 : fix build error #

Unified diffs Side-by-side diffs Delta from patch set Stats (+58 lines, -49 lines) Patch
M base/cancelable_callback.h View 1 chunk +6 lines, -4 lines 0 comments Download
M base/memory/memory_pressure_monitor_chromeos_unittest.cc View 8 chunks +8 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/login/test/wizard_in_process_browser_test.cc View 1 2 3 2 chunks +6 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/login/ui/captive_portal_window_browsertest.cc View 1 2 3 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc View 15 chunks +16 lines, -20 lines 0 comments Download
M chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_browsertest.cc View 1 2 3 4 5 3 chunks +11 lines, -9 lines 0 comments Download
M components/policy/core/common/policy_loader_mac_unittest.cc View 1 2 3 4 3 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 32 (17 generated)
fdoray
gab@: PTAL After this, I'll be able to remove MessageLoopForUIorIO::Run/RunUntilIdle.
4 years, 2 months ago (2016-09-21 16:49:34 UTC) #6
gab
lgtm % comments https://codereview.chromium.org/2354333002/diff/40001/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_browsertest.cc File chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_browsertest.cc (right): https://codereview.chromium.org/2354333002/diff/40001/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_browsertest.cc#newcode26 chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_browsertest.cc:26: TestingSpellCheckMessageFilter(const base::Closure& quit_closure) explicit https://codereview.chromium.org/2354333002/diff/40001/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_browsertest.cc#newcode57 chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_browsertest.cc:57: ...
4 years, 2 months ago (2016-09-21 17:06:03 UTC) #8
groby-ooo-7-16
On 2016/09/21 17:06:03, gab wrote: > lgtm % comments > > https://codereview.chromium.org/2354333002/diff/40001/chrome/browser/spellchecker/spellcheck_message_filter_platform_mac_browsertest.cc > File > ...
4 years, 2 months ago (2016-09-21 17:25:45 UTC) #9
fdoray
dcheng@: Please review changes in base/ xiyuan@: Please review changes in chrome/browser/chromeos/ groby@: Please review ...
4 years, 2 months ago (2016-09-21 17:46:53 UTC) #13
groby-ooo-7-16
spellcheck LGTM https://codereview.chromium.org/2354333002/diff/60001/components/policy/core/common/policy_loader_mac_unittest.cc File components/policy/core/common/policy_loader_mac_unittest.cc (right): https://codereview.chromium.org/2354333002/diff/60001/components/policy/core/common/policy_loader_mac_unittest.cc#newcode180 components/policy/core/common/policy_loader_mac_unittest.cc:180: EXPECT_TRUE(base::MessageLoopForIO::IsCurrent()); You currently assert in some files, ...
4 years, 2 months ago (2016-09-21 17:52:06 UTC) #14
xiyuan
https://codereview.chromium.org/2354333002/diff/60001/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc File chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc (left): https://codereview.chromium.org/2354333002/diff/60001/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc#oldcode203 chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc:203: loop_.RunUntilIdle(); This seems intentional to make sure all background ...
4 years, 2 months ago (2016-09-21 18:03:12 UTC) #15
fdoray
dcheng@: Please review changes in base/ xiyuan@: Please review changes in chrome/browser/chromeos/ groby@: Thanks! pastarmovj@: ...
4 years, 2 months ago (2016-09-21 18:08:01 UTC) #17
xiyuan
c/b/chromeos lgtm https://codereview.chromium.org/2354333002/diff/60001/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc File chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc (left): https://codereview.chromium.org/2354333002/diff/60001/chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc#oldcode203 chrome/browser/chromeos/policy/user_cloud_policy_store_chromeos_unittest.cc:203: loop_.RunUntilIdle(); On 2016/09/21 18:08:01, fdoray wrote: > ...
4 years, 2 months ago (2016-09-21 18:18:23 UTC) #18
dcheng
base LGTM
4 years, 2 months ago (2016-09-22 00:40:38 UTC) #19
pastarmovj
policy lgtm
4 years, 2 months ago (2016-09-22 08:18:11 UTC) #20
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/2354333002/80001
4 years, 2 months ago (2016-09-22 12:00:29 UTC) #23
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg_ng on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg_ng/builds/272963)
4 years, 2 months ago (2016-09-22 12:56:47 UTC) #25
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/2354333002/100001
4 years, 2 months ago (2016-09-22 13:34:48 UTC) #28
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years, 2 months ago (2016-09-22 15:06:29 UTC) #30
commit-bot: I haz the power
4 years, 2 months ago (2016-09-22 15:08:45 UTC) #32
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/c5e45f6b0a71c2a174bea1219f9a6709191fde50
Cr-Commit-Position: refs/heads/master@{#420342}

Powered by Google App Engine
This is Rietveld 408576698