Commit 4d8e12df authored by robliao's avatar robliao Committed by Commit bot

Add ScopedNSAutoreleasePool to SchedulerWorker's Main Loop

This provides autorelease support for Mac tasks.

BUG=553459

Review-Url: https://codereview.chromium.org/2172123003
Cr-Commit-Position: refs/heads/master@{#407267}
parent e4bcc542
......@@ -12,6 +12,10 @@
#include "base/task_scheduler/task_tracker.h"
#include "build/build_config.h"
#if defined(OS_MACOSX)
#include "base/mac/scoped_nsautorelease_pool.h"
#endif
namespace base {
namespace internal {
......@@ -41,6 +45,10 @@ class SchedulerWorker::Thread : public PlatformThread::Delegate {
!outer_->ShouldExitForTesting()) {
DCHECK(outer_);
#if defined(OS_MACOSX)
mac::ScopedNSAutoreleasePool autorelease_pool;
#endif
#if !defined(OS_LINUX)
UpdateThreadPriority(GetDesiredThreadPriority());
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment