Commit acb3d1f3 authored by stevenjb@google.com's avatar stevenjb@google.com

Fix ProcessSingletonTest.StartupRaceCondition for win.

BUG=103821
TEST=ProcessSingletonTest.StartupRaceCondition passes on win (and no other tests fail)
TBR=jam@chromium.org

Review URL: http://codereview.chromium.org/8549027

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@110741 0039d316-1c4b-4281-b951-d872f2087c98
parent f11d90d4
...@@ -158,6 +158,10 @@ BrowserMainLoop::BrowserMainLoop(const content::MainFunctionParams& parameters) ...@@ -158,6 +158,10 @@ BrowserMainLoop::BrowserMainLoop(const content::MainFunctionParams& parameters)
} }
BrowserMainLoop::~BrowserMainLoop() { BrowserMainLoop::~BrowserMainLoop() {
// Release/destroy parts here, before OleUninitialize() and before other
// members are destroyed (in particular main_message_loop_).
parts_.reset();
#if defined(OS_WIN) #if defined(OS_WIN)
OleUninitialize(); OleUninitialize();
#endif #endif
......
...@@ -53,6 +53,8 @@ class BrowserMainLoop { ...@@ -53,6 +53,8 @@ class BrowserMainLoop {
const CommandLine& parsed_command_line_; const CommandLine& parsed_command_line_;
int result_code_; int result_code_;
scoped_ptr<BrowserMainParts> parts_;
// Members initialized in |MainMessageLoopStart()| --------------------------- // Members initialized in |MainMessageLoopStart()| ---------------------------
scoped_ptr<MessageLoop> main_message_loop_; scoped_ptr<MessageLoop> main_message_loop_;
scoped_ptr<base::SystemMonitor> system_monitor_; scoped_ptr<base::SystemMonitor> system_monitor_;
...@@ -61,13 +63,6 @@ class BrowserMainLoop { ...@@ -61,13 +63,6 @@ class BrowserMainLoop {
#if defined(OS_WIN) #if defined(OS_WIN)
scoped_ptr<SystemMessageWindowWin> system_message_window_; scoped_ptr<SystemMessageWindowWin> system_message_window_;
#endif #endif
// Destroy parts_ before main_message_loop_ (required) and before other
// classes constructed in content (but after main_thread_).
scoped_ptr<BrowserMainParts> parts_;
// Members initialized in |InitializeMainThread()| ---------------------------
// This must get destroyed before other threads that are created in parts_.
scoped_ptr<BrowserThreadImpl> main_thread_; scoped_ptr<BrowserThreadImpl> main_thread_;
DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop); DISALLOW_COPY_AND_ASSIGN(BrowserMainLoop);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment