summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_thread.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/renderer/render_thread.cc')
-rw-r--r--chrome/renderer/render_thread.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/chrome/renderer/render_thread.cc b/chrome/renderer/render_thread.cc
index b37cf454..14f9313 100644
--- a/chrome/renderer/render_thread.cc
+++ b/chrome/renderer/render_thread.cc
@@ -47,8 +47,9 @@ static const unsigned int kCacheStatsDelayMS = 2000 /* milliseconds */;
// V8 needs a 1MB stack size.
static const size_t kStackSize = 1024 * 1024;
-/*static*/
-DWORD RenderThread::tls_index_ = ThreadLocalStorage::Alloc();
+// TODO(evanm): don't rely on static initialization.
+// static
+TLSSlot RenderThread::tls_index_;
//-----------------------------------------------------------------------------
// Methods below are only called on the owner's thread:
@@ -106,7 +107,6 @@ void RenderThread::RemoveRoute(int32 routing_id) {
}
void RenderThread::Init() {
- DCHECK(tls_index_) << "static initializer failed";
DCHECK(!current()) << "should only have one RenderThread per thread";
notification_service_.reset(new NotificationService);
@@ -118,7 +118,7 @@ void RenderThread::Init() {
IPC::Channel::MODE_CLIENT, this, NULL, owner_loop_, true,
RenderProcess::GetShutDownEvent()));
- ThreadLocalStorage::Set(tls_index_, this);
+ tls_index_.Set(this);
// The renderer thread should wind-up COM.
CoInitialize(0);