summaryrefslogtreecommitdiffstats
path: root/base
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 16:15:40 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 16:15:40 +0000
commit43b8b5511efeff341d3855ef8c08056fcd30a621 (patch)
tree189cea96214e6122b8c16a64a62b9ad0e29ed7d6 /base
parente9a7fe502718d74531d6d1d31be83339f1757ded (diff)
downloadchromium_src-43b8b5511efeff341d3855ef8c08056fcd30a621.zip
chromium_src-43b8b5511efeff341d3855ef8c08056fcd30a621.tar.gz
chromium_src-43b8b5511efeff341d3855ef8c08056fcd30a621.tar.bz2
Acquire lock before iterating over list of field trials
The itteration is performed in the browser process when the list of field-trial settings is passed to the renderer. I failed to acquire the lock prior to the itteration, and it appears that some code is deciding on a field trial VERY late in browser startup and racing against this render-spawn operation. The code in FieldTrial is wrong (but fixed here), but I'll still need to track down the racing thread that is performing such a late FieldTrial definition (the results of which will not be passed to some renderers). BUG=49409 R=huanr Review URL: http://codereview.chromium.org/3134015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56360 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base')
-rw-r--r--base/field_trial.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/base/field_trial.cc b/base/field_trial.cc
index 84e96a6..9a71066 100644
--- a/base/field_trial.cc
+++ b/base/field_trial.cc
@@ -138,6 +138,7 @@ void FieldTrialList::StatesToString(std::string* output) {
if (!global_)
return;
DCHECK(output->empty());
+ AutoLock auto_lock(global_->lock_);
for (RegistrationList::iterator it = global_->registered_.begin();
it != global_->registered_.end(); ++it) {
const std::string name = it->first;