deepak1556

#48411: fix: initialze featurelist before parsing features

Merged
Created: Sep 29, 2025, 12:01:51 AM
Merged: Oct 2, 2025, 6:18:15 PM
2 comments
Target: main

Description of Change

base::FeatureList needs to be initialized before any features are parsed so that appropriate field trials are setup. Today we call InitializeFeatureList from Electron::PreBrowserMain and Electron::PostEarlyInitialization however the feature list is initialized somewhere in between via Electron::PreEarlyInitialization. This results in the following crash when launching the application with a feature param --enable-features="NetAdapterMaxBufSizeFeature:NetAdapterMaxBufSize/8192".

[56990:0929/130502.801852:FATAL:base/feature_list.cc:905] DCHECK failed: trial. trial='StudyNetAdapterMaxBufSizeFeature' does not exist

This PR addresses by moving the feature list initialization before any feature parsing happens. The instance leaked is on purpose aligning with upstream https://source.chromium.org/chromium/chromium/src/+/main:content/app/content_main_runner_impl.cc;l=1150-1155

Release Notes

Notes: fix crash when passing feature param from commandline --enable-features=Feature:ParamA/Value

Backports

39-x-y
Merged
PR Number
#48442
Merged At
Oct 2, 2025, 8:58:58 PM
Released In
v39.0.0-alpha.9
Release Date
Oct 6, 2025, 8:32:10 AM

Semver Impact

Major
Breaking changes
Minor
New features
Patch
Bug fixes
None
Docs, tests, etc.

Semantic Versioning helps users understand the impact of updates:

  • Major (X.y.z): Breaking changes that may require code modifications
  • Minor (x.Y.z): New features that maintain backward compatibility
  • Patch (x.y.Z): Bug fixes that don't change the API
  • None: Changes that don't affect using facing parts of Electron