summaryrefslogtreecommitdiffstats
path: root/base/message_pump_default.cc
diff options
context:
space:
mode:
authormark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-25 20:33:42 +0000
committermark@chromium.org <mark@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2008-09-25 20:33:42 +0000
commit89836e2574a390828deb9bf86f0d169f7aacfd39 (patch)
treed41fc75cbd5d348051cf66fe12a2bf0c8f9987d4 /base/message_pump_default.cc
parent1a8f5d1d016723fb1fcc49b1fc5290fa1b7f2706 (diff)
downloadchromium_src-89836e2574a390828deb9bf86f0d169f7aacfd39.zip
chromium_src-89836e2574a390828deb9bf86f0d169f7aacfd39.tar.gz
chromium_src-89836e2574a390828deb9bf86f0d169f7aacfd39.tar.bz2
Provide autorelease pool management on the Mac in all types of message pumps.
Fix a few unit tests to use autorelease pools as needed. Review URL: http://codereview.chromium.org/3805 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@2603 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/message_pump_default.cc')
-rw-r--r--base/message_pump_default.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/base/message_pump_default.cc b/base/message_pump_default.cc
index 2fa5d94..d1ecd12 100644
--- a/base/message_pump_default.cc
+++ b/base/message_pump_default.cc
@@ -5,6 +5,7 @@
#include "base/message_pump_default.h"
#include "base/logging.h"
+#include "base/scoped_nsautorelease_pool.h"
namespace base {
@@ -17,6 +18,8 @@ void MessagePumpDefault::Run(Delegate* delegate) {
DCHECK(keep_running_) << "Quit must have been called outside of Run!";
for (;;) {
+ ScopedNSAutoreleasePool autorelease_pool;
+
bool did_work = delegate->DoWork();
if (!keep_running_)
break;