[webkit-changes] [WebKit/WebKit] 518334: [Cocoa] Temporarily wake up remote process if outg...

Chris Dumez noreply at github.com
Mon May 1 19:14:30 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 51833439139b0bb53857d4342ce05b61dfde1683
      https://github.com/WebKit/WebKit/commit/51833439139b0bb53857d4342ce05b61dfde1683
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2023-05-01 (Mon, 01 May 2023)

  Changed paths:
    M Source/WebKit/Platform/IPC/Connection.cpp
    M Source/WebKit/Platform/IPC/Connection.h
    M Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
    M Source/WebKit/UIProcess/AuxiliaryProcessProxy.h

  Log Message:
  -----------
  [Cocoa] Temporarily wake up remote process if outgoing IPC message queue becomes too large
https://bugs.webkit.org/show_bug.cgi?id=256181

Reviewed by Ben Nham.

Temporarily wake up remote process if outgoing IPC message queue becomes too
large, to avoid potentially bad memory growth when the remote process is
suspended.

This currently only works for AuxiliaryProcessProxy, so IPC from the UIProcess
to child processes. However, we may want to consider extending this to IPC
from the network process to WebProcesses in a follow-up.

In the current proposal, we wake up the destination process for 3 seconds when
its outgoing message queue has reached 1024 messages. We do so at most once
every 30 seconds.

* Source/WebKit/Platform/IPC/Connection.cpp:
(IPC::Connection::setOutgoingMessageQueueIsGrowingLargeCallback):
(IPC::Connection::invalidate):
(IPC::Connection::sendMessage):
* Source/WebKit/Platform/IPC/Connection.h:
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::AuxiliaryProcessProxy):
(WebKit::AuxiliaryProcessProxy::didFinishLaunching):
(WebKit::AuxiliaryProcessProxy::outgoingMessageQueueIsGrowingLarge):
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.h:

Canonical link: https://commits.webkit.org/263570@main




More information about the webkit-changes mailing list