LibWebView: Disable persisted SQL storage when forcing new UI processes

We very much assume that the SQL storage backend runs in a singleton
process. When this is not the case, and multiple UI processes try to
write to the database at the same time, one of them will fail.

Since --force-new-process is a testing mode flag, let's just disable the
SQL backend when that flag is present.
This commit is contained in:
Timothy Flynn 2024-09-18 13:36:45 -04:00 committed by Tim Ledbetter
parent 259e798a26
commit 4ce05e5ccf
Notes: github-actions[bot] 2024-09-18 23:03:16 +00:00

View file

@ -105,6 +105,11 @@ void Application::initialize(Main::Arguments const& arguments, URL::URL new_tab_
create_platform_arguments(args_parser);
args_parser.parse(arguments);
// Our persisted SQL storage assumes it runs in a singleton process. If we have multiple UI processes accessing
// the same underlying database, one of them is likely to fail.
if (force_new_process)
disable_sql_database = true;
Optional<ProcessType> debug_process_type;
Optional<ProcessType> profile_process_type;