diff options
author | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 22:11:47 +0000 |
---|---|---|
committer | evanm@google.com <evanm@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-20 22:11:47 +0000 |
commit | fa87a2527ca8c0bcef92d8e44791332782936911 (patch) | |
tree | 04dc5d1e6881f8356f91203a386648057b20d924 /base/message_loop.cc | |
parent | 4f64d0af5908e36d356c834005d08cca98d579fe (diff) | |
download | chromium_src-fa87a2527ca8c0bcef92d8e44791332782936911.zip chromium_src-fa87a2527ca8c0bcef92d8e44791332782936911.tar.gz chromium_src-fa87a2527ca8c0bcef92d8e44791332782936911.tar.bz2 |
Revert. Failing unit tests.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1118 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_loop.cc')
-rw-r--r-- | base/message_loop.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/base/message_loop.cc b/base/message_loop.cc index bdf99f0..caec847 100644 --- a/base/message_loop.cc +++ b/base/message_loop.cc @@ -39,9 +39,7 @@ // a TLS index to the message loop for the current thread // Note that if we start doing complex stuff in other static initializers // this could cause problems. -// TODO(evanm): this shouldn't rely on static initialization. -// static -TLSSlot MessageLoop::tls_index_; +/*static*/ TLSSlot MessageLoop::tls_index_ = ThreadLocalStorage::Alloc(); //------------------------------------------------------------------------------ @@ -85,7 +83,7 @@ MessageLoop::MessageLoop() exception_restoration_(false), state_(NULL) { DCHECK(!current()) << "should only have one message loop per thread"; - tls_index_.Set(this); + ThreadLocalStorage::Set(tls_index_, this); // TODO(darin): Generalize this to support instantiating different pumps. #if defined(OS_WIN) pump_ = new base::MessagePumpWin(); @@ -102,7 +100,7 @@ MessageLoop::~MessageLoop() { WillDestroyCurrentMessageLoop()); // OK, now make it so that no one can find us. - tls_index_.Set(NULL); + ThreadLocalStorage::Set(tls_index_, NULL); DCHECK(!state_); |