| Summary: | [GTK][WPE] Suspend web process after some time in the process cache | ||||||
|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Carlos Garcia Campos <cgarcia> | ||||
| Component: | WebKitGTK | Assignee: | Nobody <webkit-unassigned> | ||||
| Status: | RESOLVED FIXED | ||||||
| Severity: | Normal | CC: | bugs-noreply, mcatanzaro | ||||
| Priority: | P2 | Keywords: | Gtk | ||||
| Version: | WebKit Nightly Build | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Attachments: |
|
||||||
|
Description
Carlos Garcia Campos
2022-02-21 06:01:40 PST
Created attachment 452728 [details]
Patch
Comment on attachment 452728 [details]
Patch
What could go wrong? :)
Comment on attachment 452728 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=452728&action=review > Source/WebKit/UIProcess/glib/WebProcessProxyGLib.cpp:81 > +void WebProcessProxy::platformSuspendProcess() > +{ > + auto id = processIdentifier(); > + if (!id) > + return; > + > + RELEASE_LOG(Process, "%p - [PID=%i] WebProcessProxy::platformSuspendProcess", this, id); > + kill(id, SIGSTOP); > +} Since there is nothing GTK/WPE-specific here, I think I would move this to a WebProcessProxyUnix.cpp and guard it with #if !PLATFORM(COCOA). Then instead of #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(WPE) guards, you would only need to use #if PLATFORM(MAC) || OS(UNIX) guards instead. Um, is OS(UNIX) true for PLATFORM(IOS_FAMILY)? I'm not sure. Got to be careful about that, if so. Committed r290291 (247615@trunk): <https://commits.webkit.org/247615@trunk> |