Branch: refs/heads/main Home: https://github.com/WebKit/WebKit Commit: ae68cc74c3ff013810c2bbb53a486ae68f51eb85 https://github.com/WebKit/WebKit/commit/ae68cc74c3ff013810c2bbb53a486ae68f51eb85 Author: Kimmo Kinnunen <kkinnu...@apple.com> Date: 2025-08-18 (Mon, 18 Aug 2025)
Changed paths: M Source/WebKit/Platform/LogClient.cpp M Source/WebKit/Platform/LogClient.h M Source/WebKit/Scripts/generate-derived-log-sources.py M Source/WebKit/Shared/LogStream.cpp M Source/WebKit/Shared/LogStream.h M Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm M Source/WebKit/UIProcess/WebProcessProxy.h M Source/WebKit/UIProcess/WebProcessProxy.messages.in M Source/WebKit/WebProcess/WebProcess.h M Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm Log Message: ----------- Remove redundant code in log forwarding https://bugs.webkit.org/show_bug.cgi?id=297319 rdar://problem/158205594 Reviewed by Per Arne Vollan. No intended behavior changes in here: - WCP would send its process id, even though this was not used. Remove this. - Hold IPC connection objects with same name (m_connection, connection) so the code can be the same regardless of the ifdefs. - Avoid strlen'ing the message log category twice in send side (subsystem, logCategory) - Make WebProcess helper functions static and not members, they do not need the WebProcess instances. - Avoid resolving WebProcess instance in the log hook, the instance is not significant. The logging always uses the logClient() global. Slight behavior change: - Hold IPC connection objects with const Ref, so that they can be used without taking a copy. IPC::Connection was held with weak ptr. However, there is no circular ref: * WebProcess -> IPC::Connection -> WebKit::LogClient -> IPC::Connection WebProcess is never destroyed and IPC::Connection is never destroyed. * Source/WTF/wtf/PlatformEnableCocoa.h: * Source/WebKit/Platform/LogClient.cpp: (WebKit::LogClient::LogClient): (WebKit::LogClient::log): * Source/WebKit/Platform/LogClient.h: (WebKit::LogClient::send): * Source/WebKit/Scripts/generate-derived-log-sources.py: (generate_log_client_declarations_file): * Source/WebKit/Shared/LogStream.cpp: (WebKit::LogStream::LogStream): (WebKit::LogStream::stopListeningForIPC): (WebKit::LogStream::logOnBehalfOfWebContent): (WebKit::LogStream::create): (WebKit::LogStream::~LogStream): Deleted. (WebKit::LogStream::setup): Deleted. * Source/WebKit/Shared/LogStream.h: * Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm: (WebKit::WebProcessProxy::initializeLogForwarding): (WebKit::WebProcessProxy::platformDestroy): (WebKit::WebProcessProxy::setupLogStream): Deleted. * Source/WebKit/UIProcess/WebProcessProxy.h: * Source/WebKit/UIProcess/WebProcessProxy.messages.in: * Source/WebKit/WebProcess/WebProcess.h: * Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess): (WebKit::shouldIgnoreLogMessage): (WebKit::registerLogClient): (WebKit::WebProcess::initializeLogForwarding): (WebKit::WebProcess::registerLogHook): Deleted. (WebKit::WebProcess::setupLogStream): Deleted. (WebKit::WebProcess::sendLogOnStream): Deleted. Canonical link: https://commits.webkit.org/298833@main To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications _______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes