[webkit-changes] [WebKit/WebKit] 094fb9: Take grant on WebKit extension process on launch

Per Arne Vollan noreply at github.com
Fri Feb 9 14:50:01 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 094fb96f2ba5ca89933443b0f0922c6612cc5e50
      https://github.com/WebKit/WebKit/commit/094fb96f2ba5ca89933443b0f0922c6612cc5e50
  Author: Per Arne Vollan <pvollan at apple.com>
  Date:   2024-02-09 (Fri, 09 Feb 2024)

  Changed paths:
    M Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
    M Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp
    M Source/WebKit/UIProcess/Launcher/ProcessLauncher.h
    M Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm
    M Source/WebKit/UIProcess/Model/ModelProcessProxy.cpp
    M Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
    M Source/WebKit/UIProcess/WebProcessProxy.cpp

  Log Message:
  -----------
  Take grant on WebKit extension process on launch
https://bugs.webkit.org/show_bug.cgi?id=269071
rdar://122647959

Reviewed by Brent Fulgham and Chris Dumez.

There is currently a race condition on launch of WebKit extension processes where it is possible that
an extension process will be suspended before it is able to reply to the XPC bootstrap message. This is
because the system is only holding an initial assertion for a short period of time, and if the process
has not replied to the XPC bootstrap message within that timeframe, it can become suspended and will
then never reply to the bootstrap message, and the UI process will consider this process as hung.
This can be addressed by taking a grant on the process and releasing that grant when we have received
the XPC reply.

* Source/WebKit/UIProcess/Model/ModelProcessProxy.cpp:
(WebKit::ModelProcessProxy::didFinishLaunching):
* Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:
(WebKit::GPUProcessProxy::didFinishLaunching):
* Source/WebKit/UIProcess/Launcher/ProcessLauncher.h:
(WebKit::ProcessLauncher::releaseLaunchGrant):
* Source/WebKit/UIProcess/Launcher/cocoa/ProcessLauncherCocoa.mm:
(WebKit::LaunchGrant::LaunchGrant):
(WebKit::LaunchGrant::~LaunchGrant):
(WebKit::ProcessLauncher::launchProcess):
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didFinishLaunching):
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):

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




More information about the webkit-changes mailing list