diff options
author | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 20:51:51 +0000 |
---|---|---|
committer | jcampan@chromium.org <jcampan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-27 20:51:51 +0000 |
commit | aef15bdabed270718140d5ec2eee49878bd91384 (patch) | |
tree | 2a5e395791ca9d9691987018a201c5b2ff70cf12 /chrome/browser/process_singleton_win.cc | |
parent | ffeba6d07caa89ac69f1c2ef0c19aa3b1bbe4117 (diff) | |
download | chromium_src-aef15bdabed270718140d5ec2eee49878bd91384.zip chromium_src-aef15bdabed270718140d5ec2eee49878bd91384.tar.gz chromium_src-aef15bdabed270718140d5ec2eee49878bd91384.tar.bz2 |
Relanding this.
The Ole unitialization was failing on one of the Vista build-bot.
It is not clear when the Ole initialization is balanced when a CRichEditCtrl is created/destructed.
So I now turn it off explicitly.
This CL makes sure we unregister our Windows window classes when shut-down.
It also balances-out an OLE initialization performed by the CRichEditCTRL.
This is necessary for allowing to reload chrome.dll in a process, which is what
the browser tests will do.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/101004
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/process_singleton_win.cc')
-rw-r--r-- | chrome/browser/process_singleton_win.cc | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chrome/browser/process_singleton_win.cc b/chrome/browser/process_singleton_win.cc index 99d2d5f..c34a4d1 100644 --- a/chrome/browser/process_singleton_win.cc +++ b/chrome/browser/process_singleton_win.cc @@ -45,8 +45,10 @@ ProcessSingleton::ProcessSingleton(const FilePath& user_data_dir) } ProcessSingleton::~ProcessSingleton() { - if (window_) + if (window_) { DestroyWindow(window_); + UnregisterClass(chrome::kMessageWindowClass, GetModuleHandle(NULL)); + } } bool ProcessSingleton::NotifyOtherProcess() { @@ -142,7 +144,8 @@ void ProcessSingleton::Create() { wc.lpfnWndProc = ProcessSingleton::WndProcStatic; wc.hInstance = hinst; wc.lpszClassName = chrome::kMessageWindowClass; - RegisterClassEx(&wc); + ATOM clazz = RegisterClassEx(&wc); + DCHECK(clazz); std::wstring user_data_dir; PathService::Get(chrome::DIR_USER_DATA, &user_data_dir); |