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

Issue 2592143003: Allow ObserverListThreadSafe to be used from sequenced tasks. (Closed)

Created:
4 years ago by fdoray
Modified:
3 years, 10 months ago
Reviewers:
gab, melandory, rkaplow, bengr, sfiera
CC:
chromium-reviews, vmpstr+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Allow ObserverListThreadSafe to be used from sequenced tasks. Previously, observers could only be added to an ObserverListThreadSafe from single-threaded tasks. Observers were notified on the registration thread. With this CL, observers can also be added to an ObserverListThreadSafe from sequenced tasks. They are notified on the registration sequence. ObserverListThreadSafe behaves almost the same way as before when used from single-threaded tasks. The following things changed: - The order in which observers registered from the same thread are notified is no longer deterministic. - One notification task is posted for each observer rather than one notification task per thread. - If an observer is added to a NOTIFY_ALL ObserverListThreadSafe from a stack of notification dispatches, only the notification on top of the stack is sent to the newly added observer. BUG=675631 TBR=rkaplow@chromium.org,melandory@chromium.org,bengr@chromium.org,sfiera@chromium.org Review-Url: https://codereview.chromium.org/2592143003 Cr-Commit-Position: refs/heads/master@{#447311} Committed: https://chromium.googlesource.com/chromium/src/+/5062447d399be019735314f765d8d21b9433d995

Patch Set 1 #

Patch Set 2 : self-review #

Patch Set 3 : fix build error #

Patch Set 4 : add missing header #

Patch Set 5 : todo include #

Patch Set 6 : add missing include, do not use emplace #

Patch Set 7 : add missing includes #

Patch Set 8 : rebase #

Total comments: 13

Patch Set 9 : CR gab #42 #

Patch Set 10 : self-review #

Total comments: 16

Patch Set 11 : CR gab #45 #

Total comments: 2

Patch Set 12 : CR gab #47 #

Patch Set 13 : add missing include #

Patch Set 14 : add missing include #

Patch Set 15 : add missing include #

Patch Set 16 : add missing include #

Patch Set 17 : fix windows test error #

Patch Set 18 : fix test errors #

Patch Set 19 : rebase #

Patch Set 20 : rebase #

Patch Set 21 : add missing include #

Patch Set 22 : exception for Android #

Patch Set 23 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+209 lines, -148 lines) Patch
M base/android/application_status_listener_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 1 chunk +3 lines, -0 lines 0 comments Download
M base/observer_list_threadsafe.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 3 chunks +118 lines, -126 lines 0 comments Download
M base/observer_list_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 8 chunks +85 lines, -22 lines 0 comments Download
M components/metrics/net/network_metrics_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +1 line, -0 lines 0 comments Download
M components/ntp_tiles/most_visited_sites_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download
M components/ukm/ukm_service.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 120 (77 generated)
fdoray
PTAL
3 years, 12 months ago (2016-12-23 20:04:09 UTC) #18
gab
Makes browser_tests unhappy, should I review or wait for fix?
3 years, 11 months ago (2017-01-05 18:45:51 UTC) #21
fdoray
On 2017/01/05 18:45:51, gab wrote: > Makes browser_tests unhappy, should I review or wait for ...
3 years, 11 months ago (2017-01-05 19:37:21 UTC) #22
fdoray
gab@: PTAL I have pending CLs to fix test failures: - https://codereview.chromium.org/2592143003/ - https://codereview.chromium.org/2627523003/
3 years, 11 months ago (2017-01-10 13:40:49 UTC) #39
gab
On 2017/01/10 13:40:49, fdoray wrote: > gab@: PTAL Looking > > I have pending CLs ...
3 years, 11 months ago (2017-01-10 19:27:50 UTC) #40
fdoray
On 2017/01/10 19:27:50, gab wrote: > On 2017/01/10 13:40:49, fdoray wrote: > > gab@: PTAL ...
3 years, 11 months ago (2017-01-10 19:36:30 UTC) #41
gab
Top-level comment on |current_notifications_|, I don't think it works as-is. https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h File base/observer_list_threadsafe.h (right): https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h#newcode19 ...
3 years, 11 months ago (2017-01-10 21:14:50 UTC) #42
fdoray
PTAnL https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h File base/observer_list_threadsafe.h (right): https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h#newcode19 base/observer_list_threadsafe.h:19: // depend on its presence here). On 2017/01/10 ...
3 years, 11 months ago (2017-01-11 14:09:06 UTC) #44
gab
lg thanks https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h File base/observer_list_threadsafe.h (right): https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h#newcode139 base/observer_list_threadsafe.h:139: observer.second->PostNonNestableTask( On 2017/01/11 14:09:06, fdoray wrote: > ...
3 years, 11 months ago (2017-01-12 16:24:06 UTC) #45
fdoray
PTAnL https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h File base/observer_list_threadsafe.h (right): https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h#newcode139 base/observer_list_threadsafe.h:139: observer.second->PostNonNestableTask( On 2017/01/12 16:24:05, gab wrote: > On ...
3 years, 11 months ago (2017-01-12 17:17:57 UTC) #46
gab
lgtm w/ comment, thanks! https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h File base/observer_list_threadsafe.h (right): https://codereview.chromium.org/2592143003/diff/140001/base/observer_list_threadsafe.h#newcode139 base/observer_list_threadsafe.h:139: observer.second->PostNonNestableTask( On 2017/01/12 17:17:57, fdoray ...
3 years, 11 months ago (2017-01-12 20:12:15 UTC) #47
fdoray
https://codereview.chromium.org/2592143003/diff/180001/base/observer_list_threadsafe.h File base/observer_list_threadsafe.h (right): https://codereview.chromium.org/2592143003/diff/180001/base/observer_list_threadsafe.h#newcode92 base/observer_list_threadsafe.h:92: // NOTIFY_ALL, |observer| must be notified. On 2017/01/12 20:12:14, ...
3 years, 11 months ago (2017-01-12 20:57:44 UTC) #48
gab
lgtm++ :)!
3 years, 11 months ago (2017-01-13 16:52:15 UTC) #49
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/2592143003/220001
3 years, 11 months ago (2017-01-19 18:40:17 UTC) #51
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/294488) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 11 months ago (2017-01-19 18:49:32 UTC) #53
fdoray
TBR rkaplow@ for adding missing include in network_metrics_provider.cc
3 years, 11 months ago (2017-01-19 19:03:16 UTC) #55
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/2592143003/240001
3 years, 11 months ago (2017-01-19 19:04:28 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/24117) ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 11 months ago (2017-01-19 19:16:05 UTC) #61
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/2592143003/260001
3 years, 11 months ago (2017-01-19 23:13:55 UTC) #64
commit-bot: I haz the power
Try jobs failed on following builders: ios-device on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device/builds/139030) ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
3 years, 11 months ago (2017-01-19 23:27:38 UTC) #66
fdoray
TBR melandory@chromium.org for missing include added to components/password_manager/core/browser/form_fetcher_impl.cc
3 years, 11 months ago (2017-01-19 23:39:31 UTC) #68
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/2592143003/280001
3 years, 11 months ago (2017-01-19 23:40:48 UTC) #72
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/24383)
3 years, 11 months ago (2017-01-19 23:51:49 UTC) #74
fdoray
TBR bengr@chromium.org for missing include in components/precache/content/precache_manager_unittest.cc
3 years, 11 months ago (2017-01-20 00:03:57 UTC) #77
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/2592143003/300001
3 years, 11 months ago (2017-01-20 00:05:22 UTC) #80
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/140493)
3 years, 11 months ago (2017-01-20 00:15:51 UTC) #82
bengr
lgtm
3 years, 11 months ago (2017-01-20 18:13:55 UTC) #83
rkaplow
lgtm
3 years, 11 months ago (2017-01-23 15:25:27 UTC) #84
melandory
lgtm
3 years, 11 months ago (2017-01-25 12:28:19 UTC) #85
melandory
lgtm
3 years, 11 months ago (2017-01-25 12:28:20 UTC) #86
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/2592143003/380001
3 years, 10 months ago (2017-01-27 18:38:01 UTC) #93
commit-bot: I haz the power
Try jobs failed on following builders: ios-device-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-xcode-clang/builds/29115)
3 years, 10 months ago (2017-01-27 18:49:45 UTC) #95
fdoray
TBR sfiera@chromium.org for missing include
3 years, 10 months ago (2017-01-27 20:16:40 UTC) #97
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/2592143003/400001
3 years, 10 months ago (2017-01-27 20:17:44 UTC) #101
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/222205)
3 years, 10 months ago (2017-01-27 22:18:01 UTC) #103
sfiera
LGTM for //components/ntp_tiles/...
3 years, 10 months ago (2017-01-30 09:34:58 UTC) #104
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/2592143003/420001
3 years, 10 months ago (2017-01-30 16:01:34 UTC) #107
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on master.tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/373196)
3 years, 10 months ago (2017-01-30 18:21:30 UTC) #109
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/2592143003/420001
3 years, 10 months ago (2017-01-31 16:12:32 UTC) #111
commit-bot: I haz the power
Failed to apply patch for components/ntp_tiles/most_visited_sites_unittest.cc: While running git apply --index -p1; error: patch failed: ...
3 years, 10 months ago (2017-01-31 18:35:23 UTC) #113
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/2592143003/440001
3 years, 10 months ago (2017-01-31 18:43:06 UTC) #116
commit-bot: I haz the power
Committed patchset #23 (id:440001) as https://chromium.googlesource.com/chromium/src/+/5062447d399be019735314f765d8d21b9433d995
3 years, 10 months ago (2017-01-31 20:27:15 UTC) #119
tsergeant
3 years, 10 months ago (2017-02-01 00:46:26 UTC) #120
Message was sent while issue was closed.
A revert of this CL (patchset #23 id:440001) has been created in
https://codereview.chromium.org/2669673002/ by tsergeant@chromium.org.

The reason for reverting is: This CL is causing tests to fail on Linux
ChromiumOS Tests (dbg)(1):

- ProfileBrowserTest.OffTheRecordURLRequestContextIsolation
- ProfileBrowserTest.URLRequestContextIsolation

See example failed build:

https://luci-milo.appspot.com/buildbot/chromium.chromiumos/Linux%20ChromiumOS....

Powered by Google App Engine
This is Rietveld 408576698