fix: Improve --enable-features/--disable-features handling (#13920)
As it turns out, we can reinitialize the feature list directly after the user JS script has been executed instead of much later. This allows modifications to `--enable-features`/`--disable-features` to work with a greater set of features.
This commit is contained in:
parent
48ae9b7a9c
commit
23440a5ec3
3 changed files with 10 additions and 12 deletions
|
@ -154,6 +154,14 @@ void AtomBrowserMainParts::PostEarlyInitialization() {
|
|||
|
||||
// Wrap the uv loop with global env.
|
||||
node_bindings_->set_uv_env(env);
|
||||
|
||||
// We already initialized the feature list in
|
||||
// brightray::BrowserMainParts::PreEarlyInitialization(), but
|
||||
// the user JS script would not have had a chance to alter the command-line
|
||||
// switches at that point. Lets reinitialize it here to pick up the
|
||||
// command-line changes.
|
||||
base::FeatureList::ClearInstanceForTesting();
|
||||
brightray::BrowserMainParts::InitializeFeatureList();
|
||||
}
|
||||
|
||||
int AtomBrowserMainParts::PreCreateThreads() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue