summaryrefslogtreecommitdiffstats
path: root/chromium/base/threading/worker_pool_posix.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/base/threading/worker_pool_posix.cc')
-rw-r--r--chromium/base/threading/worker_pool_posix.cc18
1 files changed, 4 insertions, 14 deletions
diff --git a/chromium/base/threading/worker_pool_posix.cc b/chromium/base/threading/worker_pool_posix.cc
index cd3c9dc7543..349b5d751c1 100644
--- a/chromium/base/threading/worker_pool_posix.cc
+++ b/chromium/base/threading/worker_pool_posix.cc
@@ -6,7 +6,6 @@
#include "base/bind.h"
#include "base/callback.h"
-#include "base/debug/trace_event.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
@@ -14,6 +13,7 @@
#include "base/threading/platform_thread.h"
#include "base/threading/thread_local.h"
#include "base/threading/worker_pool.h"
+#include "base/trace_event/trace_event.h"
#include "base/tracked_objects.h"
using tracked_objects::TrackedTime;
@@ -27,14 +27,6 @@ base::LazyInstance<ThreadLocalBoolean>::Leaky
const int kIdleSecondsBeforeExit = 10 * 60;
-#ifdef ADDRESS_SANITIZER
-const int kWorkerThreadStackSize = 256 * 1024;
-#else
-// A stack size of 64 KB is too small for the CERT_PKIXVerifyCert
-// function of NSS because of NSS bug 439169.
-const int kWorkerThreadStackSize = 128 * 1024;
-#endif
-
class WorkerPoolImpl {
public:
WorkerPoolImpl();
@@ -85,7 +77,7 @@ void WorkerThread::ThreadMain() {
const std::string name = base::StringPrintf(
"%s/%d", name_prefix_.c_str(), PlatformThread::CurrentId());
// Note |name.c_str()| must remain valid for for the whole life of the thread.
- PlatformThread::SetName(name.c_str());
+ PlatformThread::SetName(name);
for (;;) {
PendingTask pending_task = pool_->WaitForTask();
@@ -95,15 +87,13 @@ void WorkerThread::ThreadMain() {
"src_file", pending_task.posted_from.file_name(),
"src_func", pending_task.posted_from.function_name());
- tracked_objects::ThreadData::PrepareForStartOfRun(pending_task.birth_tally);
tracked_objects::TaskStopwatch stopwatch;
stopwatch.Start();
pending_task.task.Run();
stopwatch.Stop();
tracked_objects::ThreadData::TallyRunOnWorkerThreadIfTracking(
- pending_task.birth_tally, TrackedTime(pending_task.time_posted),
- stopwatch);
+ pending_task.birth_tally, pending_task.time_posted, stopwatch);
}
// The WorkerThread is non-joinable, so it deletes itself.
@@ -169,7 +159,7 @@ void PosixDynamicThreadPool::AddTask(PendingTask* pending_task) {
// which will delete itself on exit.
WorkerThread* worker =
new WorkerThread(name_prefix_, this);
- PlatformThread::CreateNonJoinable(kWorkerThreadStackSize, worker);
+ PlatformThread::CreateNonJoinable(0, worker);
}
}