FeatureList crashes if no singleton is initialized |
||||||||
Issue descriptionFeatureList currently expects a singleton to be manually set by all code which uses it. This works fine in the browser where it is intialized and in unit tests which use a default initializer, however for code outside the browser which relies on the variaous components in Chromium, this causes their code to crash. An example of this is CL: https://codereview.chromium.org/2101283004/ This was an innocuous change which CRD relied on. Since the unit tests are set up to never catch these kind of problems, our team started experiencing crashes across our host and client components which required us to spend time investigating.
,
Jul 7 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/958f0473b8039a057b0e31412c2acae7dfda39cd commit 958f0473b8039a057b0e31412c2acae7dfda39cd Author: joedow <joedow@chromium.org> Date: Thu Jul 07 22:08:55 2016 Updating FeatureList default initialization pattern FeatureList currently expects a singleton to be manually set by all code which uses it. This works fine in the browser where it is intialized and in unit tests which use a default initializer, however for code outside the browser which relies on the various components in Chromium, this causes their code to crash. An example of this is CL: https://codereview.chromium.org/2101283004/ This was an innocuous change in a component which CRD relied on. Since the unit tests are set up to never catch these kind of problems, our component started crashing and we had to investigate to figure out the root cause. This change updates the feature and trial checks to initialize the singleton if it was not already initialized. If a caller tries to re-initialize the singleton after that, the init code will DCHECK as this represents a race condition and we want to ensure consistency for the callers who rely on these checks being accurate. BUG= 624879 Review-Url: https://codereview.chromium.org/2110083007 Cr-Commit-Position: refs/heads/master@{#404243} [modify] https://crrev.com/958f0473b8039a057b0e31412c2acae7dfda39cd/base/feature_list.cc [modify] https://crrev.com/958f0473b8039a057b0e31412c2acae7dfda39cd/base/feature_list.h [modify] https://crrev.com/958f0473b8039a057b0e31412c2acae7dfda39cd/base/feature_list_unittest.cc
,
Jul 8 2016
,
Jul 8 2016
Need to merge the fix to M53.
,
Jul 8 2016
,
Jul 8 2016
Your change meets the bar and is auto-approved for M53 (branch: 2785)
,
Jul 11 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8ddcefe1e6ea7e133782e06b27e9767c94755840 commit 8ddcefe1e6ea7e133782e06b27e9767c94755840 Author: Sergey Ulanov <sergeyu@chromium.org> Date: Mon Jul 11 17:39:39 2016 Updating FeatureList default initialization pattern FeatureList currently expects a singleton to be manually set by all code which uses it. This works fine in the browser where it is intialized and in unit tests which use a default initializer, however for code outside the browser which relies on the various components in Chromium, this causes their code to crash. An example of this is CL: https://codereview.chromium.org/2101283004/ This was an innocuous change in a component which CRD relied on. Since the unit tests are set up to never catch these kind of problems, our component started crashing and we had to investigate to figure out the root cause. This change updates the feature and trial checks to initialize the singleton if it was not already initialized. If a caller tries to re-initialize the singleton after that, the init code will DCHECK as this represents a race condition and we want to ensure consistency for the callers who rely on these checks being accurate. BUG= 624879 Review-Url: https://codereview.chromium.org/2110083007 Cr-Commit-Position: refs/heads/master@{#404243} (cherry picked from commit 958f0473b8039a057b0e31412c2acae7dfda39cd) Review URL: https://codereview.chromium.org/2138923002 . Cr-Commit-Position: refs/branch-heads/2785@{#85} Cr-Branched-From: 68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382} [modify] https://crrev.com/8ddcefe1e6ea7e133782e06b27e9767c94755840/base/feature_list.cc [modify] https://crrev.com/8ddcefe1e6ea7e133782e06b27e9767c94755840/base/feature_list.h [modify] https://crrev.com/8ddcefe1e6ea7e133782e06b27e9767c94755840/base/feature_list_unittest.cc
,
Jul 12 2016
,
Jul 12 2016
I've verified this was fixed in ToT, assigning to AJ to verify the fix in the release branch.
,
Jul 23 2016
verified fixed in 53.0.2785.24 |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by sheriffbot@chromium.org
, Jul 1 2016