mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-19 07:49:05 +00:00
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:
parent
259e798a26
commit
4ce05e5ccf
Notes:
github-actions[bot]
2024-09-18 23:03:16 +00:00
Author: https://github.com/trflynn89
Commit: 4ce05e5ccf
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/1434
Reviewed-by: https://github.com/tcl3 ✅
1 changed files with 5 additions and 0 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue