1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 05:27:46 +00:00

WebContent: Change the cookie setting IPC to be synchronous

Considering an operation like the following:

    document.cookie = "cookie=value";
    const value = document.cookie;

If the IPC for the cookie setter is asynchronous, the getter can execute
while the browser/SQLServer processes are still handling the setter.
This is often seen when hammering the document with cookie requests.
This commit is contained in:
Timothy Flynn 2024-01-10 12:23:00 -05:00 committed by Andreas Kling
parent 5c5cbeb491
commit a4f862a869
2 changed files with 6 additions and 2 deletions

View file

@ -54,7 +54,7 @@ endpoint WebContentClient
did_request_all_cookies(URL url) => (Vector<Web::Cookie::Cookie> cookies)
did_request_named_cookie(URL url, ByteString name) => (Optional<Web::Cookie::Cookie> cookie)
did_request_cookie(URL url, u8 source) => (ByteString cookie)
did_set_cookie(URL url, Web::Cookie::ParsedCookie cookie, u8 source) =|
did_set_cookie(URL url, Web::Cookie::ParsedCookie cookie, u8 source) => ()
did_update_cookie(Web::Cookie::Cookie cookie) =|
did_update_resource_count(i32 count_waiting) =|
did_request_new_tab(Web::HTML::ActivateTab activate_tab) => (String handle)