Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: c77bdbf2fbc8cfc2d2a9ef7dc78c0d5ac5d26f57
      
https://github.com/WebKit/WebKit/commit/c77bdbf2fbc8cfc2d2a9ef7dc78c0d5ac5d26f57
  Author: Ben Nham <[email protected]>
  Date:   2024-05-21 (Tue, 21 May 2024)

  Changed paths:
    M Source/WebKit/UIProcess/WebProcessProxy.cpp

  Log Message:
  -----------
  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



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to