mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-04 00:27:47 +00:00
FileSystemAccessServer: Manage concurrent file requests
Before this patch, when you called FileSystemAccessServer::Client::try_* twice, the second call used the same variable to store the promise. This "race condition" is now solved using a HashMap, to store multiple parallel requests.
This commit is contained in:
parent
e432a284d7
commit
9521952f36
Notes:
sideshowbarker
2024-07-17 18:38:54 +09:00
Author: https://github.com/LucasChollet
Commit: 9521952f36
Pull-request: https://github.com/SerenityOS/serenity/pull/13870
Issue: https://github.com/SerenityOS/serenity/issues/5259
Reviewed-by: https://github.com/Dexesttp
Reviewed-by: https://github.com/linusg
Reviewed-by: https://github.com/petelliott
6 changed files with 88 additions and 61 deletions
|
@ -3,10 +3,10 @@
|
|||
|
||||
endpoint FileSystemAccessServer
|
||||
{
|
||||
request_file_read_only_approved(i32 window_server_client_id, i32 window_id, String path) =|
|
||||
request_file(i32 window_server_client_id, i32 window_id, String path, Core::OpenMode requested_access) =|
|
||||
prompt_open_file(i32 window_server_client_id, i32 window_id, String window_title, String path_to_view, Core::OpenMode requested_access) =|
|
||||
prompt_save_file(i32 window_server_client_id, i32 window_id,String title, String ext, String path_to_view, Core::OpenMode requested_access) =|
|
||||
request_file_read_only_approved(i32 request_id, i32 window_server_client_id, i32 window_id, String path) =|
|
||||
request_file(i32 request_id, i32 window_server_client_id, i32 window_id, String path, Core::OpenMode requested_access) =|
|
||||
prompt_open_file(i32 request_id, i32 window_server_client_id, i32 window_id, String window_title, String path_to_view, Core::OpenMode requested_access) =|
|
||||
prompt_save_file(i32 request_id, i32 window_server_client_id, i32 window_id, String title, String ext, String path_to_view, Core::OpenMode requested_access) =|
|
||||
|
||||
expose_window_server_client_id() => (i32 client_id)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue