summaryrefslogtreecommitdiffstats
path: root/chrome/app/chrome_dll_main.cc
diff options
context:
space:
mode:
authorpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 15:35:47 +0000
committerpinkerton@chromium.org <pinkerton@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-09 15:35:47 +0000
commit7c32108b22446be27129324ce41d32e9c909e379 (patch)
tree2b18444c829ae9155036ef3c55ab1fb645b9621e /chrome/app/chrome_dll_main.cc
parent54131d25aa7e887f89ba25851b983150cd1384a8 (diff)
downloadchromium_src-7c32108b22446be27129324ce41d32e9c909e379.zip
chromium_src-7c32108b22446be27129324ce41d32e9c909e379.tar.gz
chromium_src-7c32108b22446be27129324ce41d32e9c909e379.tar.bz2
Add Recycle() method to scoped autorelease pool to allow cleaning out any junk
created at startup before the main runloop. Correct quit on Mac to let the BrowserProcess shut down the event loop when its refcount goes to zero after cleaning up all browser windows. git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9386 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/app/chrome_dll_main.cc')
-rw-r--r--chrome/app/chrome_dll_main.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/app/chrome_dll_main.cc b/chrome/app/chrome_dll_main.cc
index ebde279..f14b886 100644
--- a/chrome/app/chrome_dll_main.cc
+++ b/chrome/app/chrome_dll_main.cc
@@ -200,11 +200,10 @@ int ChromeMain(int argc, const char** argv) {
// The exit manager is in charge of calling the dtors of singleton objects.
base::AtExitManager exit_manager;
- // TODO(pinkerton): We need this pool here for all the objects created
- // before we get to the UI event loop, but we don't want to leave them
- // hanging around until the app quits. We should add a "flush" to the class
- // which just cycles the pool under the covers and then call that just
- // before we invoke the main UI loop near the bottom of this function.
+ // We need this pool for all the objects created before we get to the
+ // event loop, but we don't want to leave them hanging around until the
+ // app quits. Each "main" needs to flush this pool right before it goes into
+ // its main event loop to get rid of the cruft.
base::ScopedNSAutoreleasePool autorelease_pool;
#if defined(OS_LINUX)
@@ -307,7 +306,8 @@ int ChromeMain(int argc, const char** argv) {
startup_timer.Stop(); // End of Startup Time Measurement.
- MainFunctionParams main_params(parsed_command_line, sandbox_wrapper);
+ MainFunctionParams main_params(parsed_command_line, sandbox_wrapper,
+ &autorelease_pool);
// TODO(port): turn on these main() functions as they've been de-winified.
int rv = -1;