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

Unified Diff: base/tracked_objects.cc

Issue 5206005: Revert 66719 - Reland r65996. Disallows Singletons on non-joinable thread.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/thread_restrictions.cc ('k') | ceee/ie/broker/executors_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/tracked_objects.cc
===================================================================
--- base/tracked_objects.cc (revision 66790)
+++ base/tracked_objects.cc (working copy)
@@ -10,7 +10,6 @@
#include "base/message_loop.h"
#include "base/string_util.h"
#include "base/stringprintf.h"
-#include "base/thread_restrictions.h"
using base::TimeDelta;
@@ -90,13 +89,7 @@
// static
ThreadData::Status ThreadData::status_ = ThreadData::UNINITIALIZED;
-ThreadData::ThreadData() : next_(NULL) {
- // This shouldn't use the MessageLoop::current() LazyInstance since this might
- // be used on a non-joinable thread.
- // http://crbug.com/62728
- base::ThreadRestrictions::ScopedAllowSingleton scoped_allow_singleton;
- message_loop_ = MessageLoop::current();
-}
+ThreadData::ThreadData() : next_(NULL), message_loop_(MessageLoop::current()) {}
ThreadData::~ThreadData() {}
@@ -267,14 +260,8 @@
}
Births* ThreadData::TallyABirth(const Location& location) {
- {
- // This shouldn't use the MessageLoop::current() LazyInstance since this
- // might be used on a non-joinable thread.
- // http://crbug.com/62728
- base::ThreadRestrictions::ScopedAllowSingleton scoped_allow_singleton;
- if (!message_loop_) // In case message loop wasn't yet around...
- message_loop_ = MessageLoop::current(); // Find it now.
- }
+ if (!message_loop_) // In case message loop wasn't yet around...
+ message_loop_ = MessageLoop::current(); // Find it now.
BirthMap::iterator it = birth_map_.find(location);
if (it != birth_map_.end()) {
@@ -292,12 +279,8 @@
void ThreadData::TallyADeath(const Births& lifetimes,
const TimeDelta& duration) {
- {
- // http://crbug.com/62728
- base::ThreadRestrictions::ScopedAllowSingleton scoped_allow_singleton;
- if (!message_loop_) // In case message loop wasn't yet around...
- message_loop_ = MessageLoop::current(); // Find it now.
- }
+ if (!message_loop_) // In case message loop wasn't yet around...
+ message_loop_ = MessageLoop::current(); // Find it now.
DeathMap::iterator it = death_map_.find(&lifetimes);
if (it != death_map_.end()) {
« no previous file with comments | « base/thread_restrictions.cc ('k') | ceee/ie/broker/executors_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698