diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 18:49:21 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-05 18:49:21 +0000 |
commit | 333590006f12dc30ef7e46187c8d62a3a401d695 (patch) | |
tree | f413bc97ed77cf502486204845aec810e42b1ade /chrome_frame/chrome_frame_activex_base.h | |
parent | 004dcf2cf16bb77847f60b304b60956b8fe0079c (diff) | |
download | chromium_src-333590006f12dc30ef7e46187c8d62a3a401d695.zip chromium_src-333590006f12dc30ef7e46187c8d62a3a401d695.tar.gz chromium_src-333590006f12dc30ef7e46187c8d62a3a401d695.tar.bz2 |
Fix a ChromeFrame crash which occured in the Histogram code while adding a histogram. The histogram
macros basically instantiate a static Histogram instance which is then tracked. The static initialization
is not thread safe and thus could cause a crash if there is a race between multiple threads trying
to access the object at the same time.
Fix based on a discussion with Jim is to add thread safe versions of the macros we use for ChromeFrame.
Fixes bug http://code.google.com/p/chromium/issues/detail?id=37470
Bug=37470
Review URL: http://codereview.chromium.org/669135
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40757 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_activex_base.h')
-rw-r--r-- | chrome_frame/chrome_frame_activex_base.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/chrome_frame/chrome_frame_activex_base.h b/chrome_frame/chrome_frame_activex_base.h index 4fe5e04..1826fd5 100644 --- a/chrome_frame/chrome_frame_activex_base.h +++ b/chrome_frame/chrome_frame_activex_base.h @@ -236,11 +236,11 @@ END_MSG_MAP() // Used to perform one time tasks. if (g_first_launch_by_process_) { g_first_launch_by_process_ = false; - UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.IEVersion", - GetIEVersion(), - IE_INVALID, - IE_8, - IE_8 + 1); + THREAD_SAFE_UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.IEVersion", + GetIEVersion(), + IE_INVALID, + IE_8, + IE_8 + 1); } return S_OK; } |