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

Issue 9297010: Make it possible to use ThreadLocalStorage::Slot as a static without (Closed)

Created:
8 years, 11 months ago by Nico
Modified:
8 years, 10 months ago
Reviewers:
brettw, agl
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, brettw-cc_chromium.org
Visibility:
Public.

Description

Make it possible to use ThreadLocalStorage::Slot as a static without introducing static initializers. Member variables can stay TLS::Slots and their behavior doesn't change. Static instances use TLS::StaticSlot instead. Kind of like http://codereview.chromium.org/8491043 but for TLS. BUG=none TEST=none TBR=agl Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=119679

Patch Set 1 #

Patch Set 2 : . #

Patch Set 3 : rebase #

Patch Set 4 : win #

Patch Set 5 : test #

Patch Set 6 : rebase #

Patch Set 7 : . #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -30 lines) Patch
M base/threading/thread_local_storage.h View 1 2 3 4 5 6 3 chunks +27 lines, -9 lines 0 comments Download
M base/threading/thread_local_storage_posix.cc View 3 chunks +7 lines, -7 lines 0 comments Download
M base/threading/thread_local_storage_unittest.cc View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M base/threading/thread_local_storage_win.cc View 1 2 3 4 chunks +7 lines, -7 lines 0 comments Download
M base/tracked_objects.h View 1 chunk +1 line, -1 line 0 comments Download
M base/tracked_objects.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M net/base/dns_reloader.cc View 1 chunk +2 lines, -3 lines 0 comments Download
M ppapi/proxy/ppb_message_loop_proxy.cc View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 15 (0 generated)
Nico
This is currently more proof-of-concept than a real CL. If you don't hate it, I'll ...
8 years, 11 months ago (2012-01-27 06:24:38 UTC) #1
brettw
Seems like a fine approach. I wonder if TLS_INITIALIZER should be BASE_TLS_INITIALIZER for some scoping, ...
8 years, 10 months ago (2012-01-27 20:52:14 UTC) #2
Nico
I verified that this does indeed remove 3 static initializers on linux (which wasn't obvious ...
8 years, 10 months ago (2012-01-28 03:37:10 UTC) #3
brettw
Actually, we use base::LINKER_INITIALIZED which is even better :) because it's an enum. Though for ...
8 years, 10 months ago (2012-01-28 03:41:41 UTC) #4
Evan Martin
On 2012/01/28 03:37:10, Nico wrote: > I verified that this does indeed remove 3 static ...
8 years, 10 months ago (2012-01-28 18:12:10 UTC) #5
brettw
lgtm
8 years, 10 months ago (2012-01-30 05:46:17 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9297010/2008
8 years, 10 months ago (2012-01-30 05:47:34 UTC) #7
commit-bot: I haz the power
Presubmit check for 9297010-2008 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 10 months ago (2012-01-30 05:47:38 UTC) #8
Nico
+agl for net OWNERShip
8 years, 10 months ago (2012-01-30 05:48:39 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9297010/2008
8 years, 10 months ago (2012-01-30 05:48:54 UTC) #10
commit-bot: I haz the power
Try job failure for 9297010-2008 (retry) on mac_rel for step "net_unittests". It's a second try, ...
8 years, 10 months ago (2012-01-30 07:38:36 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9297010/2008
8 years, 10 months ago (2012-01-30 07:40:08 UTC) #12
commit-bot: I haz the power
Try job failure for 9297010-2008 on linux_rel for step "update". http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_rel&number=12501 Step "update" is always ...
8 years, 10 months ago (2012-01-30 07:41:52 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/thakis@chromium.org/9297010/2008
8 years, 10 months ago (2012-01-30 15:43:03 UTC) #14
agl
8 years, 10 months ago (2012-01-30 16:04:36 UTC) #15
LGTM for net/

Powered by Google App Engine
This is Rietveld 408576698