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

Issue 2296923003: Make TestSimpleTaskRunner thread-safe. (Closed)

Created:
4 years, 3 months ago by fdoray
Modified:
4 years, 3 months ago
CC:
chromium-reviews, davemoore+watch_chromium.org, ortuno+watch_chromium.org, oshima+watch_chromium.org, scheib+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make TestSimpleTaskRunner thread-safe. From task_runner.h: "Implementations of TaskRunner should be thread-safe in that all methods must be safe to call on any thread." The fact that TestSimpleTaskRunner doesn't respect this contract is confusing. It led to a CL being reverted because it caused a DCHECK failure inside TestSimpleTaskRunner. https://codereview.chromium.org/2277333002/ This CL ensures that this won't happen again by making TestSimpleTaskRunner thread-safe. BUG=632184 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/980375e38eac6b3669a25a0d5f2a8991f57a4d55 Cr-Commit-Position: refs/heads/master@{#416654}

Patch Set 1 #

Patch Set 2 : add missing include, make destructor protected #

Patch Set 3 : fix build error #

Patch Set 4 : fix test #

Patch Set 5 : fix asan error #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+86 lines, -78 lines) Patch
M base/test/test_simple_task_runner.h View 1 2 3 4 chunks +17 lines, -14 lines 3 comments Download
M base/test/test_simple_task_runner.cc View 1 2 3 3 chunks +23 lines, -19 lines 0 comments Download
M cc/test/ordered_simple_task_runner.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M chrome/browser/chromeos/policy/heartbeat_scheduler_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/chromeos/policy/status_uploader_unittest.cc View 6 chunks +7 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/policy/system_log_uploader_unittest.cc View 5 chunks +5 lines, -5 lines 0 comments Download
M components/policy/core/common/cloud/cloud_policy_refresh_scheduler_unittest.cc View 5 chunks +6 lines, -6 lines 0 comments Download
M components/policy/core/common/cloud/external_policy_data_updater_unittest.cc View 1 2 3 4 8 chunks +9 lines, -9 lines 0 comments Download
M components/policy/core/common/policy_statistics_collector_unittest.cc View 4 chunks +4 lines, -4 lines 0 comments Download
M device/bluetooth/bluetooth_adapter_win_unittest.cc View 6 chunks +6 lines, -6 lines 0 comments Download
M device/bluetooth/bluetooth_task_manager_win_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 39 (26 generated)
fdoray
PTAL
4 years, 3 months ago (2016-08-31 21:42:58 UTC) #13
danakj
LGTM https://codereview.chromium.org/2296923003/diff/80001/base/test/test_simple_task_runner.h File base/test/test_simple_task_runner.h (right): https://codereview.chromium.org/2296923003/diff/80001/base/test/test_simple_task_runner.h#newcode72 base/test/test_simple_task_runner.h:72: ~TestSimpleTaskRunner() override; nit: idk why this is protected.. ...
4 years, 3 months ago (2016-09-01 21:22:18 UTC) #22
fdoray
jochen@chromium.org: Please review changes in chrome/browser/ pastarmovj@chromium.org: Please review changes in components/policy/ ortuno@chromium.org: Please review ...
4 years, 3 months ago (2016-09-02 17:39:16 UTC) #24
fdoray
jochen@chromium.org: Please review changes in chrome/browser/ pastarmovj@chromium.org: Please review changes in components/policy/ ortuno@chromium.org: Please review ...
4 years, 3 months ago (2016-09-02 17:39:38 UTC) #26
ortuno
device/bluetooth lgtm
4 years, 3 months ago (2016-09-02 17:47:27 UTC) #27
danakj
https://codereview.chromium.org/2296923003/diff/80001/base/test/test_simple_task_runner.h File base/test/test_simple_task_runner.h (right): https://codereview.chromium.org/2296923003/diff/80001/base/test/test_simple_task_runner.h#newcode72 base/test/test_simple_task_runner.h:72: ~TestSimpleTaskRunner() override; On 2016/09/02 17:39:16, fdoray wrote: > On ...
4 years, 3 months ago (2016-09-02 20:00:07 UTC) #28
jochen (gone - plz use gerrit)
the chrome/browser stuff should all be covered by Julian as well
4 years, 3 months ago (2016-09-05 09:47:39 UTC) #29
pastarmovj
lgtm
4 years, 3 months ago (2016-09-05 16:23:01 UTC) #30
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/2296923003/80001
4 years, 3 months ago (2016-09-06 14:01:24 UTC) #32
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on master.tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/136472)
4 years, 3 months ago (2016-09-06 14:36:55 UTC) #34
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/2296923003/80001
4 years, 3 months ago (2016-09-06 16:36:57 UTC) #36
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 3 months ago (2016-09-06 17:47:48 UTC) #37
commit-bot: I haz the power
4 years, 3 months ago (2016-09-06 17:50:31 UTC) #39
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/980375e38eac6b3669a25a0d5f2a8991f57a4d55
Cr-Commit-Position: refs/heads/master@{#416654}

Powered by Google App Engine
This is Rietveld 408576698