Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3897)

Unified Diff: base/win/atl_module.cc

Issue 8467002: Fix double-initialization of CComModule. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/win/atl_module.h ('k') | chrome/browser/accessibility/browser_accessibility_win_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/win/atl_module.cc
===================================================================
--- base/win/atl_module.cc (revision 0)
+++ base/win/atl_module.cc (revision 0)
@@ -0,0 +1,21 @@
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/win/atl_module.h"
+
+#include <atlbase.h>
+#include <atlcom.h>
+
+namespace base {
+namespace win {
+
+void CreateATLModuleIfNeeded() {
+ if (_pAtlModule == NULL) {
+ static CComModule module;
rvargas (doing something else) 2011/11/04 21:53:03 Shouldn't this should be CAtlModule? The construct
dmazzoni 2011/11/04 22:34:47 Is there any other good reason? Otherwise it just
rvargas (doing something else) 2011/11/04 22:52:14 It should feel like black magic already: what is _
dmazzoni 2011/11/04 23:01:30 Didn't realize it initialized it. Fixed.
+ _pAtlModule = &module;
+ }
+}
+
+} // namespace win
+} // namespace base
« no previous file with comments | « base/win/atl_module.h ('k') | chrome/browser/accessibility/browser_accessibility_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698