From 7c32108b22446be27129324ce41d32e9c909e379 Mon Sep 17 00:00:00 2001 From: "pinkerton@chromium.org" Date: Mon, 9 Feb 2009 15:35:47 +0000 Subject: 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 --- chrome/common/main_function_params.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'chrome/common/main_function_params.h') diff --git a/chrome/common/main_function_params.h b/chrome/common/main_function_params.h index 5537879..1a240c5 100644 --- a/chrome/common/main_function_params.h +++ b/chrome/common/main_function_params.h @@ -12,13 +12,19 @@ #include "base/command_line.h" #include "chrome/common/sandbox_init_wrapper.h" +namespace base { +class ScopedNSAutoreleasePool; +}; class Task; struct MainFunctionParams { - MainFunctionParams(const CommandLine& cl, const SandboxInitWrapper& sb) - : command_line_(cl), sandbox_info_(sb), ui_task(NULL) { } + MainFunctionParams(const CommandLine& cl, const SandboxInitWrapper& sb, + base::ScopedNSAutoreleasePool* pool) + : command_line_(cl), sandbox_info_(sb), autorelease_pool_(pool), + ui_task(NULL) { } const CommandLine& command_line_; const SandboxInitWrapper& sandbox_info_; + base::ScopedNSAutoreleasePool* autorelease_pool_; // Used by InProcessBrowserTest. If non-null BrowserMain schedules this // task to run on the MessageLoop and BrowserInit is not invoked. Task* ui_task; -- cgit v1.1