update libjxl

This commit is contained in:
Alexander Frick 2024-04-16 22:36:54 -05:00
parent 0f31324f27
commit b2e0640dc5
2 changed files with 272 additions and 304 deletions

File diff suppressed because it is too large Load diff

View file

@ -153,8 +153,6 @@
#if BUILDFLAG(IS_CHROMEOS)
#include "chromeos/dbus/constants/dbus_paths.h"
#include "components/crash/core/app/breakpad_linux.h"
#include "ui/gfx/linux/gbm_util.h" // nogncheck
#endif
#if BUILDFLAG(IS_CHROMEOS_ASH)
@ -839,15 +837,6 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
const auto* invoked_in_browser =
absl::get_if<InvokedInBrowserProcess>(&invoked_in);
if (!invoked_in_browser) {
#if BUILDFLAG(IS_CHROMEOS)
// At this point, the base::FeatureList has been initialized and the process
// should still be single threaded. Additionally, minigbm shouldn't have
// been used yet by this process. Therefore, it's a good time to ensure the
// Intel media compression environment flag for minigbm is correctly set
// (it's possible this environment variable wasn't inherited from the
// browser process).
ui::EnsureIntelMediaCompressionEnvVarIsSet();
#endif // BUILDFLAG(IS_CHROMEOS)
CommonEarlyInitialization(invoked_in);
return std::nullopt;
}
@ -956,14 +945,6 @@ std::optional<int> ChromeMainDelegate::PostEarlyInitialization(
->chrome_feature_list_creator();
chrome_feature_list_creator->CreateFeatureList();
#if BUILDFLAG(IS_CHROMEOS)
// At this point, the base::FeatureList has been initialized and the process
// should still be single threaded. Additionally, minigbm shouldn't have been
// used yet by this process. Therefore, it's a good time to ensure the Intel
// media compression environment flag for minigbm is correctly set.
ui::EnsureIntelMediaCompressionEnvVarIsSet();
#endif // BUILDFLAG(IS_CHROMEOS)
content::InitializeMojoCore();
#if BUILDFLAG(IS_CHROMEOS_LACROS)
@ -1142,8 +1123,19 @@ void ChromeMainDelegate::CommonEarlyInitialization(InvokedIn invoked_in) {
return invoked_in_child.is_zygote_child;
}},
invoked_in);
base::HangWatcher::InitializeOnMainThread(
hang_watcher_process_type, /*is_zygote_child=*/is_zygote_child);
const bool emit_crashes =
#if BUILDFLAG(IS_LINUX) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_MAC) || \
BUILDFLAG(IS_WIN)
chrome::GetChannel() == version_info::Channel::CANARY ||
chrome::GetChannel() == version_info::Channel::DEV;
#else
false;
#endif
base::HangWatcher::InitializeOnMainThread(hang_watcher_process_type,
/*is_zygote_child=*/is_zygote_child,
emit_crashes);
base::InitializeCpuReductionExperiment();
base::sequence_manager::internal::SequenceManagerImpl::InitializeFeatures();
@ -1284,12 +1276,6 @@ std::optional<int> ChromeMainDelegate::BasicStartupComplete() {
v8_crashpad_support::SetUp();
#endif
#if BUILDFLAG(IS_CHROMEOS)
if (!crash_reporter::IsCrashpadEnabled()) {
breakpad::SetFirstChanceExceptionHandler(v8::TryHandleWebAssemblyTrapPosix);
}
#endif
#if BUILDFLAG(IS_POSIX)
if (HandleVersionSwitches(command_line)) {
return 0; // Got a --version switch; exit with a success error code.
@ -1745,14 +1731,6 @@ void ChromeMainDelegate::PreSandboxStartup() {
} else {
base::android::InitJavaExceptionReporterForChildProcess();
}
#elif BUILDFLAG(IS_CHROMEOS)
if (crash_reporter::IsCrashpadEnabled()) {
crash_reporter::InitializeCrashpad(process_type.empty(), process_type);
crash_reporter::SetFirstChanceExceptionHandler(
v8::TryHandleWebAssemblyTrapPosix);
} else {
breakpad::InitCrashReporter(process_type);
}
#else
crash_reporter::InitializeCrashpad(process_type.empty(), process_type);
crash_reporter::SetFirstChanceExceptionHandler(
@ -1901,19 +1879,9 @@ void ChromeMainDelegate::ZygoteForked() {
base::CommandLine::ForCurrentProcess();
std::string process_type =
command_line->GetSwitchValueASCII(switches::kProcessType);
#if BUILDFLAG(IS_CHROMEOS)
if (crash_reporter::IsCrashpadEnabled()) {
crash_reporter::InitializeCrashpad(false, process_type);
crash_reporter::SetFirstChanceExceptionHandler(
v8::TryHandleWebAssemblyTrapPosix);
} else {
breakpad::InitCrashReporter(process_type);
}
#else
crash_reporter::InitializeCrashpad(false, process_type);
crash_reporter::SetFirstChanceExceptionHandler(
v8::TryHandleWebAssemblyTrapPosix);
#endif
// Reset the command line for the newly spawned process.
crash_keys::SetCrashKeysFromCommandLine(*command_line);