Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3972)

Unified Diff: base/threading/sequenced_worker_pool.cc

Issue 9874020: Provide a NSAutoreleasePool for the SequencedWorkerPool::Inner::ThreadLoop(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698