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_active_document.cc | |
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_active_document.cc')
-rw-r--r-- | chrome_frame/chrome_active_document.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome_frame/chrome_active_document.cc b/chrome_frame/chrome_active_document.cc index 64cd750..4da4056e 100644 --- a/chrome_frame/chrome_active_document.cc +++ b/chrome_frame/chrome_active_document.cc @@ -239,8 +239,8 @@ STDMETHODIMP ChromeActiveDocument::Load(BOOL fully_avalable, url_fetcher_.UseMonikerForUrl(moniker_name, bind_context, url); } - UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.FullTabLaunchType", - is_chrome_protocol, 0, 1, 2); + THREAD_SAFE_UMA_HISTOGRAM_CUSTOM_COUNTS("ChromeFrame.FullTabLaunchType", + is_chrome_protocol, 0, 1, 2); return S_OK; } |