Bug 228227 - [GTK][WPE] Add API to pass WebKitMemoryPressureHandler parameters to the network processes
Summary: [GTK][WPE] Add API to pass WebKitMemoryPressureHandler parameters to the netw...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Miguel Gomez
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-07-23 02:52 PDT by Miguel Gomez
Modified: 2021-08-15 23:56 PDT (History)
8 users (show)

See Also:


Attachments
Patch (23.24 KB, patch)
2021-07-23 05:09 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff
Patch (23.49 KB, patch)
2021-08-13 07:59 PDT, Miguel Gomez
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Miguel Gomez 2021-07-23 02:52:19 PDT
Now that WebKitMemoryPressureSettings have been added to WebKitGTK and WPE in bug 222738, we need a way to pass these settings to the network processes as well.
Comment 1 Miguel Gomez 2021-07-23 05:09:10 PDT
Created attachment 434081 [details]
Patch
Comment 2 EWS Watchlist 2021-07-23 05:10:19 PDT
Thanks for the patch. If this patch contains new public API please make sure it follows the guidelines for new WebKit2 GTK+ API. See https://trac.webkit.org/wiki/WebKitGTK/AddingNewWebKit2API
Comment 3 Carlos Garcia Campos 2021-08-13 01:42:34 PDT
Comment on attachment 434081 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=434081&action=review

> Source/WebKit/UIProcess/soup/WebProcessPoolSoup.cpp:42
> +    static const char* disableMemoryPressureMonitor = getenv("WEBKIT_DISABLE_MEMORY_PRESSURE_MONITOR");

Since this is static, you should check if we already have a value before getting it again.

> Tools/TestWebKitAPI/Tests/WebKitGLib/TestWebsiteData.cpp:823
> +        WebKitMemoryPressureSettings* settings = webkit_memory_pressure_settings_new();
> +        webkit_website_data_manager_set_memory_pressure_settings(settings);
> +        webkit_memory_pressure_settings_free(settings);

Since the config is std::optional, I think we can allow to pass NULL and pass std::optional to the process pool
Comment 4 Miguel Gomez 2021-08-13 07:59:18 PDT
Created attachment 435483 [details]
Patch
Comment 5 EWS 2021-08-15 23:56:08 PDT
Committed r281070 (240531@main): <https://commits.webkit.org/240531@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435483 [details].