diff options
author | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 14:40:10 +0000 |
---|---|---|
committer | mad@chromium.org <mad@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-12-23 14:40:10 +0000 |
commit | d144255434dd27109c30c4e7a8124d76d7e83a4b (patch) | |
tree | 2d3c9768230161683305bbac9cae4d60cb3b6a06 /chrome/renderer/renderer_main.cc | |
parent | 6d5e8255ed5b7e8865fd20af2530953990376f9f (diff) | |
download | chromium_src-d144255434dd27109c30c4e7a8124d76d7e83a4b.zip chromium_src-d144255434dd27109c30c4e7a8124d76d7e83a4b.tar.gz chromium_src-d144255434dd27109c30c4e7a8124d76d7e83a4b.tar.bz2 |
Properly lock access to static variables.
There were a few race conditions where the static method would test the validity of the hitograms_ static variable before attempting to use the lock_ to protect access to it but nothing then prevented the destructor to free both the lock_ and the hitograms_ memory.
So I decided to not use a dynamic allocation of the static lock_ to resolve this problem.
BUG=38354
TEST=Hard to repro exit scenario crashes.
Review URL: http://codereview.chromium.org/5784005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70054 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/renderer_main.cc')
-rw-r--r-- | chrome/renderer/renderer_main.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/chrome/renderer/renderer_main.cc b/chrome/renderer/renderer_main.cc index 4039ed2..13554d6 100644 --- a/chrome/renderer/renderer_main.cc +++ b/chrome/renderer/renderer_main.cc @@ -251,7 +251,7 @@ int RendererMain(const MainFunctionParams& parameters) { // Initialize histogram statistics gathering system. // Don't create StatisticsRecorder in the single process mode. scoped_ptr<base::StatisticsRecorder> statistics; - if (!base::StatisticsRecorder::WasStarted()) { + if (!base::StatisticsRecorder::IsActive()) { statistics.reset(new base::StatisticsRecorder()); } |