[webkit-changes] [WebKit/WebKit] 233820: WebKit processes should not suspend during launch ...
Per Arne Vollan
noreply at github.com
Thu Aug 1 07:32:08 PDT 2024
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 233820692ce5b0785c5631f10beb51b7fa9d99be
https://github.com/WebKit/WebKit/commit/233820692ce5b0785c5631f10beb51b7fa9d99be
Author: Per Arne Vollan <pvollan at apple.com>
Date: 2024-08-01 (Thu, 01 Aug 2024)
Changed paths:
M Source/WebKit/GPUProcess/GPUProcess.cpp
M Source/WebKit/GPUProcess/GPUProcess.h
M Source/WebKit/GPUProcess/GPUProcess.messages.in
M Source/WebKit/ModelProcess/ModelProcess.cpp
M Source/WebKit/ModelProcess/ModelProcess.h
M Source/WebKit/ModelProcess/ModelProcess.messages.in
M Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp
M Source/WebKit/UIProcess/AuxiliaryProcessProxy.h
M Source/WebKit/UIProcess/Cocoa/AuxiliaryProcessProxyCocoa.mm
M Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp
M Source/WebKit/UIProcess/Launcher/ProcessLauncher.h
M Source/WebKit/UIProcess/Model/ModelProcessProxy.cpp
M Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
M Source/WebKit/UIProcess/WebProcessPool.cpp
M Source/WebKit/UIProcess/WebProcessProxy.cpp
Log Message:
-----------
WebKit processes should not suspend during launch and initialization
https://bugs.webkit.org/show_bug.cgi?id=277163
rdar://132590940
Reviewed by Chris Dumez.
Currently, there is a chance that WebKit processes on iOS will suspend between launch and initialization.
This is becaues we release the launch grant in AuxiliaryProcessProxy::didFinishLaunching, but we do not
take a foreground activity until later. For the WebContent process we do take a foreground activity when
initializing the process, but there is a chance the WebContent process can be suspended between the launch
and initialization events. For the Networking and GPU process, we do not take a foreground activity during
initialization. This is addressed by capturing an activity and launch grant when sending the message that
initializes the process, and releasing it after process initialization is finished. This is done for all
process types.
* Source/WebKit/GPUProcess/GPUProcess.cpp:
(WebKit::GPUProcess::initializeGPUProcess):
* Source/WebKit/GPUProcess/GPUProcess.h:
* Source/WebKit/GPUProcess/GPUProcess.messages.in:
* Source/WebKit/ModelProcess/ModelProcess.messages.in:
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.cpp:
(WebKit::AuxiliaryProcessProxy::sendMessage):
(WebKit::AuxiliaryProcessProxy::didFinishLaunching):
* Source/WebKit/UIProcess/AuxiliaryProcessProxy.h:
(WebKit::AuxiliaryProcessProxy::didFinishProcessInitialization):
* Source/WebKit/UIProcess/Model/ModelProcessProxy.cpp:
(WebKit::ModelProcessProxy::ModelProcessProxy):
* Source/WebKit/UIProcess/GPU/GPUProcessProxy.cpp:
(WebKit::GPUProcessProxy::GPUProcessProxy):
* Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::sendCreationParametersToNewProcess):
* Source/WebKit/UIProcess/WebProcessPool.cpp:
(WebKit::WebProcessPool::initializeNewWebProcess):
* Source/WebKit/UIProcess/WebProcessPool.h:
* Source/WebKit/UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::initializeWebProcess):
* Source/WebKit/UIProcess/WebProcessProxy.h:
Canonical link: https://commits.webkit.org/281708@main
To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications
More information about the webkit-changes
mailing list