summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 17:45:28 +0000
committerjar@chromium.org <jar@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-17 17:45:28 +0000
commita83fd1495e739957ee68dd429aeab202d627d199 (patch)
treea009db34c6f6b72e55fd7d1e33d26b4f4dd93ff8
parentfd9a66a10353556be8f28aad743a96dcee7679b9 (diff)
downloadchromium_src-a83fd1495e739957ee68dd429aeab202d627d199.zip
chromium_src-a83fd1495e739957ee68dd429aeab202d627d199.tar.gz
chromium_src-a83fd1495e739957ee68dd429aeab202d627d199.tar.bz2
Merge 56360 - 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 TBR=jar@chromium.org Review URL: http://codereview.chromium.org/3169018 git-svn-id: svn://svn.chromium.org/chrome/branches/472/src@56381 0039d316-1c4b-4281-b951-d872f2087c98
-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 137c8c3..4ddbf30 100644
--- a/base/field_trial.cc
+++ b/base/field_trial.cc
@@ -135,6 +135,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;