Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Avoid duplicate ReleaseMemory calls on Mac
https://bugs.webkit.org/show_bug.cgi?id=274396 rdar://127750149 Reviewed by Chris Dumez. On the Mac, we enable NON_VISIBLE_WEBPROCESS_MEMORY_CLEANUP_TIMER, which calls releaseMemory to clean up memory two minutes after a WebContent process has no visible webpages. We also call releaseMemory just before a process suspends (in `WebProcessProxy::prepareToDropLastAssertion`), whcih generally happens 8 minutes after a WebContent process has no visible webpages (see `_wasRecentlyVisibleActivity` in WebPageProxy). This means we are calling ReleaseMemory twice as a WebContent process transitions from foreground to background to suspended states. We only meant to call this once. Fix this by disabling the call to releaseMemory in prepareToDropLastAssertion if the non-visible cleanup timer is enabled. * Source/WebKit/UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::prepareToDropLastAssertion): Canonical link: https://commits.webkit.org/279059@main
- Loading branch information