fix: initialize field trial list
https://chromium-review.googlesource.com/c/1402880
This commit is contained in:
parent
d47ed72d17
commit
38c3891337
4 changed files with 3 additions and 23 deletions
|
@ -284,6 +284,7 @@ void AtomBrowserMainParts::RegisterDestructionCallback(
|
||||||
|
|
||||||
int AtomBrowserMainParts::PreEarlyInitialization() {
|
int AtomBrowserMainParts::PreEarlyInitialization() {
|
||||||
InitializeFeatureList();
|
InitializeFeatureList();
|
||||||
|
field_trial_list_ = std::make_unique<base::FieldTrialList>(nullptr);
|
||||||
OverrideAppLogsPath();
|
OverrideAppLogsPath();
|
||||||
#if defined(USE_X11)
|
#if defined(USE_X11)
|
||||||
views::LinuxUI::SetInstance(BuildGtkUi());
|
views::LinuxUI::SetInstance(BuildGtkUi());
|
||||||
|
|
|
@ -10,6 +10,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include "base/callback.h"
|
#include "base/callback.h"
|
||||||
|
#include "base/metrics/field_trial.h"
|
||||||
#include "base/timer/timer.h"
|
#include "base/timer/timer.h"
|
||||||
#include "content/public/browser/browser_context.h"
|
#include "content/public/browser/browser_context.h"
|
||||||
#include "content/public/browser/browser_main_parts.h"
|
#include "content/public/browser/browser_main_parts.h"
|
||||||
|
@ -126,6 +127,7 @@ class AtomBrowserMainParts : public content::BrowserMainParts {
|
||||||
std::unique_ptr<NodeEnvironment> node_env_;
|
std::unique_ptr<NodeEnvironment> node_env_;
|
||||||
std::unique_ptr<NodeDebugger> node_debugger_;
|
std::unique_ptr<NodeDebugger> node_debugger_;
|
||||||
std::unique_ptr<IconManager> icon_manager_;
|
std::unique_ptr<IconManager> icon_manager_;
|
||||||
|
std::unique_ptr<base::FieldTrialList> field_trial_list_;
|
||||||
|
|
||||||
base::RepeatingTimer gc_timer_;
|
base::RepeatingTimer gc_timer_;
|
||||||
|
|
||||||
|
|
|
@ -75,4 +75,3 @@ color_chooser_win.patch
|
||||||
fix_disable_usage_of_abort_report_np_in_mas_builds.patch
|
fix_disable_usage_of_abort_report_np_in_mas_builds.patch
|
||||||
fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
|
fix_disable_usage_of_pthread_fchdir_np_and_pthread_chdir_np_in_mas.patch
|
||||||
fix_disable_usage_of_setapplicationisdaemon_and.patch
|
fix_disable_usage_of_setapplicationisdaemon_and.patch
|
||||||
fixme_disable_field-trial_descriptor_dcheck.patch
|
|
||||||
|
|
|
@ -1,22 +0,0 @@
|
||||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jeremy Apthorp <nornagon@nornagon.net>
|
|
||||||
Date: Thu, 21 Feb 2019 17:17:51 -0800
|
|
||||||
Subject: FIXME: disable field-trial descriptor DCHECK
|
|
||||||
|
|
||||||
|
|
||||||
diff --git a/content/browser/child_process_launcher_helper_posix.cc b/content/browser/child_process_launcher_helper_posix.cc
|
|
||||||
index 30f424d662bdc72e692bf86d0270ef1cb50fd8fc..2b2ed424152f5feccad81eef3c89892d6189f477 100644
|
|
||||||
--- a/content/browser/child_process_launcher_helper_posix.cc
|
|
||||||
+++ b/content/browser/child_process_launcher_helper_posix.cc
|
|
||||||
@@ -83,8 +83,9 @@ std::unique_ptr<PosixFileDescriptorInfo> CreateDefaultPosixFilesToMap(
|
|
||||||
// Mac shared memory doesn't use file descriptors.
|
|
||||||
#if !defined(OS_MACOSX)
|
|
||||||
int fd = base::FieldTrialList::GetFieldTrialDescriptor();
|
|
||||||
- DCHECK_NE(fd, -1);
|
|
||||||
- files_to_register->Share(service_manager::kFieldTrialDescriptor, fd);
|
|
||||||
+ //DCHECK_NE(fd, -1);
|
|
||||||
+ if (fd >= 0)
|
|
||||||
+ files_to_register->Share(service_manager::kFieldTrialDescriptor, fd);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DCHECK(mojo_channel_remote_endpoint.is_valid());
|
|
Loading…
Reference in a new issue