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

Issue 18501008: 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:
vandebo (ex-Chrome), chromium-reviews, jamiewalch+watch_chromium.org, feature-media-reviews_chromium.org, sanjeevr, sadrul, weitaosu+watch_chromium.org, dcaiafa+watch_chromium.org, Lei Zhang, amit, hclam+watch_chromium.org, wez+watch_chromium.org, gavinp+memory_chromium.org, garykac+watch_chromium.org, tommycli, lambroslambrou+watch_chromium.org, rmsousa+watch_chromium.org, Greg Billock, darin-cc_chromium.org, alexeypa+watch_chromium.org, erikwright+watch_chromium.org, sergeyu+watch_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. This is a continuation of issue: https://chromiumcodereview.appspot.com/18231002/ The original issue got messed up by a rietveld bug, so refer there for history and comments. BUG=165590 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=211956

Patch Set 1 #

Patch Set 2 : Fix token counting from id=1 rather than 0. #

Patch Set 3 : Break out SequencedWorkerPool changes into separate CL. #

Patch Set 4 : Change method name per jar comments. #

Patch Set 5 : Change upstream (I hope) #

Patch Set 6 : Adapt to upstream changes #

Total comments: 18

Patch Set 7 : Fix stale comments. #

Patch Set 8 : #

Total comments: 2

Patch Set 9 : Fix race #

Total comments: 18

Patch Set 10 : Overhaul test. #

Total comments: 8

Patch Set 11 : #

Total comments: 2

Patch Set 12 : #

Patch Set 13 : #

Patch Set 14 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+374 lines, -292 lines) Patch
M base/base.gyp View 1 2 3 4 5 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 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -6 lines 0 comments Download
M base/message_loop/message_pump_io_ios.h View 1 chunk +1 line, -0 lines 0 comments Download
M base/sequence_checker.h View 1 2 3 3 chunks +2 lines, -14 lines 0 comments Download
M base/sequence_checker_impl.h View 1 2 3 4 5 6 1 chunk +18 lines, -24 lines 0 comments Download
M base/sequence_checker_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +27 lines, -12 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 1 chunk +314 lines, -14 lines 0 comments Download
M chrome/browser/storage_monitor/storage_monitor.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/media/webmediaplayer_ms.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M remoting/host/audio_capturer_win.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 24 (0 generated)
tommycli
Original issue is screwed and can't be fixed without deleting comment history, so this is ...
7 years, 5 months ago (2013-07-03 18:34:33 UTC) #1
akalin
Mind pulling out the SWP changes to a separate CL? This change is starting to ...
7 years, 5 months ago (2013-07-03 20:07:11 UTC) #2
tommycli
Thanks. SequencedWorkerPool pulled out into separate CL here: https://codereview.chromium.org/18650006/ I addressed jar's comments also. Most ...
7 years, 5 months ago (2013-07-03 21:08:43 UTC) #3
tommycli
akalin: I've adapted this CL to the lg'ed globally unique SequenceToken CL. May I have ...
7 years, 5 months ago (2013-07-08 18:45:02 UTC) #4
tommycli
akalin: ping
7 years, 5 months ago (2013-07-10 18:06:07 UTC) #5
akalin
On 2013/07/10 18:06:07, tommycli wrote: > akalin: ping Sorry for the delay, I'll look today
7 years, 5 months ago (2013-07-11 18:55:41 UTC) #6
akalin
few nits, some comments on tests may want to get owners approval now, too, either ...
7 years, 5 months ago (2013-07-11 19:31:22 UTC) #7
Wez
https://chromiumcodereview.appspot.com/18501008/diff/33001/base/memory/weak_ptr.cc File base/memory/weak_ptr.cc (right): https://chromiumcodereview.appspot.com/18501008/diff/33001/base/memory/weak_ptr.cc#newcode13 base/memory/weak_ptr.cc:13: // the same Flag take place on the same ...
7 years, 5 months ago (2013-07-11 21:00:11 UTC) #8
tommycli
akalin / wez : addressed your comments. https://codereview.chromium.org/18501008/diff/33001/base/memory/weak_ptr.cc File base/memory/weak_ptr.cc (right): https://codereview.chromium.org/18501008/diff/33001/base/memory/weak_ptr.cc#newcode13 base/memory/weak_ptr.cc:13: // the ...
7 years, 5 months ago (2013-07-11 21:39:13 UTC) #9
tommycli
darin: would like an OWNER review. thanks.
7 years, 5 months ago (2013-07-12 00:21:24 UTC) #10
akalin
https://codereview.chromium.org/18501008/diff/51001/base/sequence_checker_impl.cc File base/sequence_checker_impl.cc (right): https://codereview.chromium.org/18501008/diff/51001/base/sequence_checker_impl.cc#newcode17 base/sequence_checker_impl.cc:17: EnsureSequenceTokenAssigned(); i think this is racy. It's entirely possible ...
7 years, 5 months ago (2013-07-12 00:26:38 UTC) #11
tommycli
akalin: Fixed. good catch. https://codereview.chromium.org/18501008/diff/51001/base/sequence_checker_impl.cc File base/sequence_checker_impl.cc (right): https://codereview.chromium.org/18501008/diff/51001/base/sequence_checker_impl.cc#newcode17 base/sequence_checker_impl.cc:17: EnsureSequenceTokenAssigned(); On 2013/07/12 00:26:38, akalin ...
7 years, 5 months ago (2013-07-12 00:48:06 UTC) #12
akalin
I still got a few more comments on tests (sorry, I'm a stickler for good ...
7 years, 5 months ago (2013-07-12 01:09:20 UTC) #13
tommycli
akalin: I overhauled the unit test. Hope it addresses your concerns. https://codereview.chromium.org/18501008/diff/33001/base/sequence_checker_unittest.cc File base/sequence_checker_unittest.cc (right): ...
7 years, 5 months ago (2013-07-12 19:16:24 UTC) #14
akalin
looks much better! few more comments https://codereview.chromium.org/18501008/diff/73001/base/memory/weak_ptr.cc File base/memory/weak_ptr.cc (right): https://codereview.chromium.org/18501008/diff/73001/base/memory/weak_ptr.cc#newcode13 base/memory/weak_ptr.cc:13: // the same ...
7 years, 5 months ago (2013-07-12 19:41:49 UTC) #15
tommycli
akalin: thx, i made more changes. https://codereview.chromium.org/18501008/diff/73001/base/memory/weak_ptr.cc File base/memory/weak_ptr.cc (right): https://codereview.chromium.org/18501008/diff/73001/base/memory/weak_ptr.cc#newcode13 base/memory/weak_ptr.cc:13: // the same ...
7 years, 5 months ago (2013-07-12 22:00:06 UTC) #16
akalin
lgtm! https://codereview.chromium.org/18501008/diff/82001/base/sequence_checker_unittest.cc File base/sequence_checker_unittest.cc (right): https://codereview.chromium.org/18501008/diff/82001/base/sequence_checker_unittest.cc#newcode122 base/sequence_checker_unittest.cc:122: TEST_F(SequenceCheckerTest, CallsAllowedOnSameThread) { can you move the tests ...
7 years, 5 months ago (2013-07-12 22:05:13 UTC) #17
tommycli
akalin: thank you sir! https://codereview.chromium.org/18501008/diff/82001/base/sequence_checker_unittest.cc File base/sequence_checker_unittest.cc (right): https://codereview.chromium.org/18501008/diff/82001/base/sequence_checker_unittest.cc#newcode122 base/sequence_checker_unittest.cc:122: TEST_F(SequenceCheckerTest, CallsAllowedOnSameThread) { On 2013/07/12 ...
7 years, 5 months ago (2013-07-12 22:09:34 UTC) #18
tommycli
darin: ping for final OWNER approval.
7 years, 5 months ago (2013-07-15 20:44:27 UTC) #19
darin (slow to review)
LGTM
7 years, 5 months ago (2013-07-16 16:18:33 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/18501008/90001
7 years, 5 months ago (2013-07-16 16:20:58 UTC) #21
commit-bot: I haz the power
Failed to trigger a try job on android_dbg HTTP Error 400: Bad Request
7 years, 5 months ago (2013-07-16 20:49:06 UTC) #22
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tommycli@chromium.org/18501008/111001
7 years, 5 months ago (2013-07-16 20:50:13 UTC) #23
commit-bot: I haz the power
7 years, 5 months ago (2013-07-17 05:35:17 UTC) #24
Message was sent while issue was closed.
Change committed as 211956

Powered by Google App Engine
This is Rietveld 408576698