From bed167957ed5a4d907daf9b4e234c4fe96dccb8b Mon Sep 17 00:00:00 2001 From: Domi Date: Sun, 16 Jul 2023 23:20:21 +0200 Subject: [PATCH] Assert ContentMainRunnerImpl::Run (#823) --- base/metrics/field_trial.cc | 4 ++++ content/app/content_main_runner_impl.cc | 3 +++ 2 files changed, 7 insertions(+) diff --git a/base/metrics/field_trial.cc b/base/metrics/field_trial.cc index 1b6ea7675d39ce..faee208214a678 100644 --- a/base/metrics/field_trial.cc +++ b/base/metrics/field_trial.cc @@ -737,6 +737,10 @@ void FieldTrialList::CreateTrialsFromCommandLine(const CommandLine& cmd_line, return; } + recordreplay::Assert( + "[RUN-2350-2356] FieldTrialList::CreateTrialsFromCommandLine %d %d", + recordreplay::IsRecordingOrReplaying(), recordreplay::FeatureEnabled("no-field-trials")); + #if !BUILDFLAG(IS_NACL) && !BUILDFLAG(IS_IOS) if (cmd_line.HasSwitch(switches::kFieldTrialHandle)) { std::string switch_value = diff --git a/content/app/content_main_runner_impl.cc b/content/app/content_main_runner_impl.cc index 6965f862853afa..c9849c78851e9a 100644 --- a/content/app/content_main_runner_impl.cc +++ b/content/app/content_main_runner_impl.cc @@ -1049,6 +1049,9 @@ int NO_STACK_PROTECTOR ContentMainRunnerImpl::Run() { // Zygotes will run this at a later point in time when the command line // has been updated. CreateChildThreadPool(process_type); + recordreplay::Assert("[RUN-2350-2356] ContentMainRunnerImpl::Run %d", + delegate_->ShouldCreateFeatureList( + ContentMainDelegate::InvokedInChildProcess())); if (delegate_->ShouldCreateFeatureList( ContentMainDelegate::InvokedInChildProcess())) { InitializeFieldTrialAndFeatureList();