This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
GPUProcess doesn't get notified of imminent process suspension
https://bugs.webkit.org/show_bug.cgi?id=239815 Reviewed by Tim Horton. By defaults, ProcessThrottler in the UIProcess use a ProcessAndUIAssertion instance internally, instead of a simple ProcessAssertion. This makes sure that a process assertion is taken on behalf of the UIProcess as well, not just the child process. This also makes sure that when the UIProcess has been in the background for too long and its assertion gets invalidated, we release all ProcessAndUIAssertion instances as well. The WebProcess and NetworkProcess were correctly using a ProcessAndUIAssertion. However, the GPUProcess was passing `false` when constructing the ProcessThrottler, causing it to use a simple ProcessAssertion. As a result, the GPUProcess would not get notified on imminent suspension when the app has been running in the background for too long. This patch aligns the behavior of the GPUProcess with the one of the NetworkProcess since both processes are very similar. * Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp: (WebKit::GPUProcessProxy::GPUProcessProxy): * Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::NetworkProcessProxy): (WebKit::anyProcessPoolShouldTakeUIBackgroundAssertion): Deleted. * Source/WebKit/UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::anyProcessPoolNeedsUIBackgroundAssertion): * Source/WebKit/UIProcess/WebProcessPool.h: Canonical link: https://commits.webkit.org/250076@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@293562 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing 4 changed files with 12 additions and 11 deletions.