diff options
author | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-11 20:57:44 +0000 |
---|---|---|
committer | tommi@chromium.org <tommi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-01-11 20:57:44 +0000 |
commit | 73ecbbee4f993079a1aab60dfe140effd79f50d8 (patch) | |
tree | 9c3c1bad4d4dbd58f86ea7deb43d2d520b1fecff /chrome/common/win_util.h | |
parent | b09e09085f7778d06d4b9ceef1e841d950f69eaa (diff) | |
download | chromium_src-73ecbbee4f993079a1aab60dfe140effd79f50d8.zip chromium_src-73ecbbee4f993079a1aab60dfe140effd79f50d8.tar.gz chromium_src-73ecbbee4f993079a1aab60dfe140effd79f50d8.tar.bz2 |
Fixing build break after I moved the meat of ScopedCOMInitializer into the .cc file.
Instead of modifying all of the depending .scons and .vcproj files, I'm just removing the DCHECK() I had added and moving the calls back into the header file where they were to begin with.
Review URL: http://codereview.chromium.org/17350
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@7861 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/common/win_util.h')
-rw-r--r-- | chrome/common/win_util.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/chrome/common/win_util.h b/chrome/common/win_util.h index 02a8ace..5de3329 100644 --- a/chrome/common/win_util.h +++ b/chrome/common/win_util.h @@ -61,8 +61,13 @@ class CoMemReleaser { // destructor. class ScopedCOMInitializer { public: - ScopedCOMInitializer(); - ~ScopedCOMInitializer(); + ScopedCOMInitializer() : hr_(CoInitialize(NULL)) { + } + + ScopedCOMInitializer::~ScopedCOMInitializer() { + if (SUCCEEDED(hr_)) + CoUninitialize(); + } // Returns the error code from CoInitialize(NULL) // (called in constructor) |