| Index: base/task_scheduler/scheduler_worker.cc
|
| diff --git a/base/task_scheduler/scheduler_worker.cc b/base/task_scheduler/scheduler_worker.cc
|
| index d05d63aafda5711b671bf0fa13c77f4a0c331242..ca0cdc5193a671dba36a3b8cdbb5a786cf71cc81 100644
|
| --- a/base/task_scheduler/scheduler_worker.cc
|
| +++ b/base/task_scheduler/scheduler_worker.cc
|
| @@ -16,6 +16,8 @@
|
|
|
| #if defined(OS_MACOSX)
|
| #include "base/mac/scoped_nsautorelease_pool.h"
|
| +#elif defined(OS_WIN)
|
| +#include "base/win/scoped_com_initializer.h"
|
| #endif
|
|
|
| namespace base {
|
| @@ -46,6 +48,14 @@ class SchedulerWorker::Thread : public PlatformThread::Delegate {
|
| // A SchedulerWorker starts out waiting for work.
|
| WaitForWork();
|
|
|
| +#if defined(OS_WIN)
|
| + // This is required as SequencedWorkerPool previously blindly CoInitialized
|
| + // all of its threads.
|
| + // TODO: Get rid of this broad COM scope and force tasks that care about a
|
| + // CoInitialized environment to request one (via an upcoming ExecutionMode).
|
| + win::ScopedCOMInitializer com_initializer;
|
| +#endif
|
| +
|
| while (!outer_->task_tracker_->IsShutdownComplete() &&
|
| !outer_->should_exit_for_testing_.IsSet()) {
|
| DCHECK(outer_);
|
|
|