Index: base/threading/sequenced_worker_pool.cc |
diff --git a/base/threading/sequenced_worker_pool.cc b/base/threading/sequenced_worker_pool.cc |
index d994d977d308c6e57ea55a60520204ef4b022852..be8f4639853b710b7e7f688260a37b7c6af4411a 100644 |
--- a/base/threading/sequenced_worker_pool.cc |
+++ b/base/threading/sequenced_worker_pool.cc |
@@ -26,6 +26,10 @@ |
#include "base/time.h" |
#include "base/tracked_objects.h" |
+#if defined(OS_MACOSX) |
+#include "base/mac/scoped_nsautorelease_pool.h" |
+#endif |
+ |
namespace base { |
namespace { |
@@ -409,6 +413,10 @@ void SequencedWorkerPool::Inner::ThreadLoop(Worker* this_worker) { |
DCHECK(result.second); |
while (true) { |
+#if defined(OS_MACOSX) |
+ base::mac::ScopedNSAutoreleasePool autorelease_pool; |
+#endif |
+ |
// See GetWork for what delete_these_outside_lock is doing. |
SequencedTask task; |
std::vector<Closure> delete_these_outside_lock; |