| Index: base/threading/worker_pool_posix.cc
|
| diff --git a/base/threading/worker_pool_posix.cc b/base/threading/worker_pool_posix.cc
|
| index afa9a5044f5ded76b86c444c5bca8084bc921df5..947914c4b6ae5bfeeb0ccd991fd96ea1d03672e9 100644
|
| --- a/base/threading/worker_pool_posix.cc
|
| +++ b/base/threading/worker_pool_posix.cc
|
| @@ -30,6 +30,14 @@ base::LazyInstance<ThreadLocalBoolean>::Leaky
|
|
|
| const int kIdleSecondsBeforeExit = 10 * 60;
|
|
|
| +#if defined(OS_MACOSX)
|
| +// On Mac OS X a background thread's default stack size is 512Kb. We need at
|
| +// least 1MB for compilation tasks in V8, so increase this default.
|
| +const int kStackSize = 1 * 1024 * 1024;
|
| +#else
|
| +const int kStackSize = 0;
|
| +#endif
|
| +
|
| class WorkerPoolImpl {
|
| public:
|
| WorkerPoolImpl();
|
| @@ -146,7 +154,7 @@ void PosixDynamicThreadPool::AddTask(PendingTask* pending_task) {
|
| // The new PlatformThread will take ownership of the WorkerThread object,
|
| // which will delete itself on exit.
|
| WorkerThread* worker = new WorkerThread(name_prefix_, this);
|
| - PlatformThread::CreateNonJoinable(0, worker);
|
| + PlatformThread::CreateNonJoinable(kStackSize, worker);
|
| }
|
| }
|
|
|
|
|