[webkit-changes] [WebKit/WebKit] 4aa42d: Enable logd blocking in WebContent

Per Arne Vollan noreply at github.com
Wed Apr 12 17:36:57 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 4aa42d865f38d565a6f3d4c62fc5c37e0a4d4066
      https://github.com/WebKit/WebKit/commit/4aa42d865f38d565a6f3d4c62fc5c37e0a4d4066
  Author: Per Arne Vollan <pvollan at apple.com>
  Date:   2023-04-12 (Wed, 12 Apr 2023)

  Changed paths:
    M Source/WTF/wtf/PlatformEnableCocoa.h
    M Source/WTF/wtf/spi/cocoa/OSLogSPI.h
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h
    M Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in
    M Source/WebKit/WebProcess/WebProcess.cpp
    M Source/WebKit/WebProcess/WebProcess.h
    M Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm

  Log Message:
  -----------
  Enable logd blocking in WebContent
https://bugs.webkit.org/show_bug.cgi?id=255222
rdar://106827155

Reviewed by Chris Dumez.

Enable logd blocking in WebContent on iOS. In this configuration, the logs will be forwarded to the
Networking process and logged there with the prefix: 'WebContent[pid=%d, processIdentifier=%d]'.
I have verified that signposts are working after this change. This patch also contains a change to
improve performance. Most logging takes place on the main thread in WebContent. This patch moves
most of the logging work to a secondary thread with lower priority. Some validation of IPC
parameters has also been removed on the recipient side, in order to improve performance.

* Source/WTF/wtf/spi/cocoa/OSLogSPI.h:
* Source/WTF/wtf/PlatformEnableCocoa.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::logOnBehalfOfWebContent):
(WebKit::validatedASCIIString): Deleted.
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h:
* Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::registerLogHook):
* Source/WebKit/WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensureNetworkProcessConnection):
(WebKit::WebProcess::networkProcessConnectionClosed):
(WebKit::WebProcess::networkProcessConnectionID):
(WebKit::WebProcess::setNetworkProcessConnectionID):
* Source/WebKit/WebProcess/WebProcess.h:

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




More information about the webkit-changes mailing list