Commit c177095a authored by rtenneti@chromium.org's avatar rtenneti@chromium.org

Removed unnecessary call to initialize the COM library

to fix the crash because CoInitialize() call failed.

BUG=85589
TEST=thread_watcher unit tests
R=willchan
Review URL: http://codereview.chromium.org/7301009

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@91714 0039d316-1c4b-4281-b951-d872f2087c98
parent 66cf89ee
...@@ -649,12 +649,6 @@ void WatchDogThread::Init() { ...@@ -649,12 +649,6 @@ void WatchDogThread::Init() {
// This thread shouldn't be allowed to perform any blocking disk I/O. // This thread shouldn't be allowed to perform any blocking disk I/O.
base::ThreadRestrictions::SetIOAllowed(false); base::ThreadRestrictions::SetIOAllowed(false);
#if defined(OS_WIN)
// Initializes the COM library on the current thread.
HRESULT result = CoInitialize(NULL);
CHECK(result == S_OK);
#endif
base::AutoLock lock(lock_); base::AutoLock lock(lock_);
CHECK(!watchdog_thread_); CHECK(!watchdog_thread_);
watchdog_thread_ = this; watchdog_thread_ = this;
...@@ -664,11 +658,3 @@ void WatchDogThread::CleanUp() { ...@@ -664,11 +658,3 @@ void WatchDogThread::CleanUp() {
base::AutoLock lock(lock_); base::AutoLock lock(lock_);
watchdog_thread_ = NULL; watchdog_thread_ = NULL;
} }
void WatchDogThread::CleanUpAfterMessageLoopDestruction() {
#if defined(OS_WIN)
// Closes the COM library on the current thread. CoInitialize must be balanced
// by a corresponding call to CoUninitialize.
CoUninitialize();
#endif
}
...@@ -455,7 +455,6 @@ class WatchDogThread : public base::Thread { ...@@ -455,7 +455,6 @@ class WatchDogThread : public base::Thread {
protected: protected:
virtual void Init(); virtual void Init();
virtual void CleanUp(); virtual void CleanUp();
virtual void CleanUpAfterMessageLoopDestruction();
private: private:
static bool PostTaskHelper( static bool PostTaskHelper(
......
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