Bug 280681 - [GTK] WebKitWebProcess not reused nor freed after "timeout"
Summary: [GTK] WebKitWebProcess not reused nor freed after "timeout"
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: Other
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-10-01 07:23 PDT by Milan Crha
Modified: 2024-10-01 09:16 PDT (History)
3 users (show)

See Also:


Attachments
wk2.c (reproducer) (12.51 KB, text/plain)
2024-10-01 07:23 PDT, Milan Crha
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Crha 2024-10-01 07:23:40 PDT
Created attachment 472750 [details]
wk2.c (reproducer)

Follow up from bug #279914, still with webkit2gtk4.1-2.46.0-3.fc42.x86_64

Steps:
1) get the reproducer from the attachment, just compile & run it (see the first line of the file)
2) whenever you click the "Reload" button there are added new WebKitWebProcess-es, even though the URL-s being opened in the web view are the same.

The Reload first loads "evo-file://...." URL, then "mail://..." URL, in both cases the same URL-s no change in them, thus the re-use might be possible, but that does not happen, new WebProcess-es are created regardless.

(My) Theory: reuse works for http://, https://, maybe file://, but when there are used custom schemes it misbehaves.

The second problem: the bug #279914 mentions the unused processes might get vanished after some time (can be 5 minutes or 30 minutes), but they stay there even after two hours of the application being idle, user not interacting with it.
Comment 1 Michael Catanzaro 2024-10-01 07:45:38 PDT
This will be a blocker for porting Evolution to GTK 4 since PSON is mandatory there.
Comment 2 Milan Crha 2024-10-01 08:04:17 PDT
> This will be a blocker for porting Evolution to GTK 4 since PSON is mandatory there.

I'm not sure of it. The web view changes the origin, but it's not like the mail:// contains other than mail:// iframes. The other resources are handled by the Evolution itself, the WebView/WebPage does not have access to the Internet (virtually speaking, because WebKit does not ask for each and ever URL, like the preload DNS and some others).

Anyway, gtk4 for evo is too far away, do not make it stop you from fixing current bugs.