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

Issue 18231002: base: Change WeakPtr to use SequenceChecker instead of ThreadChecker. (Closed)

Created:
7 years, 5 months ago by tommycli
Modified:
7 years, 5 months ago
CC:
chromium-reviews, erikwright+watch_chromium.org, gavinp+memory_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

base: Change WeakPtr to use SequenceChecker instead of ThreadChecker. This will enable WeakPtr to be used in SequencedWorkerPool, et al. with a sequence token. BUG=165590

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : Update comments #

Patch Set 4 : #

Total comments: 16

Patch Set 5 : Address vandebo comments. #

Patch Set 6 : Un-exclude SequencedWorkerPool from nacl_untrusted build. #

Patch Set 7 : Add comprehensive destructor test #

Patch Set 8 : Fix IWYU issue. #

Patch Set 9 : Fix find and replace botch. #

Patch Set 10 : Fix death tests on ios. #

Total comments: 2

Patch Set 11 : #

Patch Set 12 : Change to method name to Owner and accessibility to private. #

Patch Set 13 : Fix Windows IWYU. #

Patch Set 14 : #

Patch Set 15 : #

Patch Set 16 : "IWYU on storage monitor" #

Patch Set 17 : #

Patch Set 18 : Fix a typo. #

Total comments: 4

Patch Set 19 : Add comment clarifying behavior. #

Patch Set 20 : Make issued SequenceTokens globally unique. #

Patch Set 21 : #

Patch Set 22 : Crazy formatting on TLS ptr. #

Total comments: 2

Patch Set 23 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+451 lines, -301 lines) Patch
M base/base.gyp 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 +0 lines, -1 line 0 comments Download
M base/base.gypi 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 +0 lines, -1 line 0 comments Download
M base/memory/weak_ptr.h View 2 chunks +3 lines, -3 lines 0 comments Download
M base/memory/weak_ptr.cc View 1 chunk +5 lines, -5 lines 0 comments Download
M base/message_loop/message_pump_io_ios.h View 1 2 3 4 5 6 7 1 chunk +1 line, -0 lines 0 comments Download
M base/sequence_checker.h View 1 2 3 4 3 chunks +1 line, -13 lines 0 comments Download
M base/sequence_checker_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +18 lines, -23 lines 0 comments Download
M base/sequence_checker_impl.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 +32 lines, -10 lines 0 comments Download
D base/sequence_checker_impl_unittest.cc View 1 chunk +0 lines, -218 lines 0 comments Download
M base/sequence_checker_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +343 lines, -15 lines 0 comments Download
M base/threading/sequenced_worker_pool.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 chunks +6 lines, -1 line 0 comments Download
M base/threading/sequenced_worker_pool.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 12 chunks +39 lines, -9 lines 0 comments Download
M base/threading/sequenced_worker_pool_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +0 lines, -2 lines 0 comments Download
M chrome/browser/storage_monitor/storage_monitor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +1 line, -0 lines 0 comments Download
M remoting/host/audio_capturer_win.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
webkit/renderer/media/webmediaplayer_ms.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 21 (0 generated)
tommycli
vandebo: Can I get an initial sanity check on my testing strategy? I basically threw ...
7 years, 5 months ago (2013-06-28 20:17:31 UTC) #1
vandebo (ex-Chrome)
https://codereview.chromium.org/18231002/diff/8001/base/sequence_checker.h File base/sequence_checker.h (right): https://codereview.chromium.org/18231002/diff/8001/base/sequence_checker.h#newcode1 base/sequence_checker.h:1: // Copyright 2013 The Chromium Authors. All rights reserved. ...
7 years, 5 months ago (2013-06-28 21:00:06 UTC) #2
tommycli
https://codereview.chromium.org/18231002/diff/8001/base/sequence_checker.h File base/sequence_checker.h (right): https://codereview.chromium.org/18231002/diff/8001/base/sequence_checker.h#newcode1 base/sequence_checker.h:1: // Copyright 2013 The Chromium Authors. All rights reserved. ...
7 years, 5 months ago (2013-06-28 22:37:07 UTC) #3
tommycli
akalin: I changed your SequenceChecker to fit it into WeakPtr's use pattern. I'd like your ...
7 years, 5 months ago (2013-06-28 22:51:07 UTC) #4
akalin
https://codereview.chromium.org/18231002/diff/33001/base/threading/sequenced_worker_pool.h File base/threading/sequenced_worker_pool.h (right): https://codereview.chromium.org/18231002/diff/33001/base/threading/sequenced_worker_pool.h#newcode147 base/threading/sequenced_worker_pool.h:147: static SequencedWorkerPool* Current(); i don't really like exposing this. ...
7 years, 5 months ago (2013-06-28 23:32:00 UTC) #5
tommycli
https://codereview.chromium.org/18231002/diff/33001/base/threading/sequenced_worker_pool.h File base/threading/sequenced_worker_pool.h (right): https://codereview.chromium.org/18231002/diff/33001/base/threading/sequenced_worker_pool.h#newcode147 base/threading/sequenced_worker_pool.h:147: static SequencedWorkerPool* Current(); On 2013/06/28 23:32:00, akalin wrote: > ...
7 years, 5 months ago (2013-06-28 23:49:49 UTC) #6
akalin
On 2013/06/28 23:49:49, tommycli wrote: > https://codereview.chromium.org/18231002/diff/33001/base/threading/sequenced_worker_pool.h > File base/threading/sequenced_worker_pool.h (right): > > https://codereview.chromium.org/18231002/diff/33001/base/threading/sequenced_worker_pool.h#newcode147 > ...
7 years, 5 months ago (2013-06-28 23:51:16 UTC) #7
tommycli
On 2013/06/28 23:51:16, akalin wrote: > On 2013/06/28 23:49:49, tommycli wrote: > > > https://codereview.chromium.org/18231002/diff/33001/base/threading/sequenced_worker_pool.h ...
7 years, 5 months ago (2013-06-29 00:09:35 UTC) #8
akalin
On 2013/06/29 00:09:35, tommycli wrote: > On 2013/06/28 23:51:16, akalin wrote: > > On 2013/06/28 ...
7 years, 5 months ago (2013-06-29 00:33:11 UTC) #9
tommycli
On 2013/06/29 00:33:11, akalin wrote: > On 2013/06/29 00:09:35, tommycli wrote: > > On 2013/06/28 ...
7 years, 5 months ago (2013-06-29 04:02:22 UTC) #10
tommycli
On 2013/06/29 04:02:22, tommycli wrote: > On 2013/06/29 00:33:11, akalin wrote: > > On 2013/06/29 ...
7 years, 5 months ago (2013-07-01 17:23:37 UTC) #11
akalin
On 2013/07/01 17:23:37, tommycli wrote: > On 2013/06/29 04:02:22, tommycli wrote: > > On 2013/06/29 ...
7 years, 5 months ago (2013-07-01 17:44:44 UTC) #12
tommycli
On 2013/07/01 17:44:44, akalin wrote: > On 2013/07/01 17:23:37, tommycli wrote: > > On 2013/06/29 ...
7 years, 5 months ago (2013-07-01 18:07:38 UTC) #13
tommycli
darin: Ready for a base/ OWNER review. Been working on this with akalin and vandebo.
7 years, 5 months ago (2013-07-01 21:25:17 UTC) #14
darin (slow to review)
This looks pretty good. I just have one substantive comment. https://codereview.chromium.org/18231002/diff/73001/base/sequence_checker_impl.cc File base/sequence_checker_impl.cc (right): https://codereview.chromium.org/18231002/diff/73001/base/sequence_checker_impl.cc#newcode23 ...
7 years, 5 months ago (2013-07-02 13:54:23 UTC) #15
tommycli
darin: addressed your comments below https://codereview.chromium.org/18231002/diff/73001/base/sequence_checker_impl.cc File base/sequence_checker_impl.cc (right): https://codereview.chromium.org/18231002/diff/73001/base/sequence_checker_impl.cc#newcode23 base/sequence_checker_impl.cc:23: if (!pool_) On 2013/07/02 ...
7 years, 5 months ago (2013-07-02 17:22:57 UTC) #16
darin (slow to review)
I see. It seems like the sequence token assigner could be the singleton too. Had ...
7 years, 5 months ago (2013-07-02 21:41:51 UTC) #17
tommycli
darin: Here's a version that assigns SequenceTokens that are unique across all SWP instances. Let ...
7 years, 5 months ago (2013-07-03 00:45:32 UTC) #18
darin (slow to review)
https://codereview.chromium.org/18231002/diff/122001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://codereview.chromium.org/18231002/diff/122001/base/threading/sequenced_worker_pool.cc#newcode396 base/threading/sequenced_worker_pool.cc:396: static volatile subtle::Atomic32 g_last_sequence_number_; Looks like this code might ...
7 years, 5 months ago (2013-07-03 07:59:41 UTC) #19
tommycli
darin: Patchset 23 uses StaticAtomicSequenceNumber. https://codereview.chromium.org/18231002/diff/122001/base/threading/sequenced_worker_pool.cc File base/threading/sequenced_worker_pool.cc (right): https://codereview.chromium.org/18231002/diff/122001/base/threading/sequenced_worker_pool.cc#newcode396 base/threading/sequenced_worker_pool.cc:396: static volatile subtle::Atomic32 g_last_sequence_number_; ...
7 years, 5 months ago (2013-07-03 18:16:30 UTC) #20
tommycli
7 years, 5 months ago (2013-07-03 18:35:44 UTC) #21
Message was sent while issue was closed.
This CL is closed due to reitveld bug.

Continued here: https://chromiumcodereview.appspot.com/18501008/

Powered by Google App Engine
This is Rietveld 408576698