Title: [280757] trunk/Source
Revision
280757
Author
[email protected]
Date
2021-08-07 09:34:40 -0700 (Sat, 07 Aug 2021)

Log Message

Unreviewed, reverting r280756.
https://bugs.webkit.org/show_bug.cgi?id=228897

Broke gtk build

Reverted changeset:

"Deduplicate logging channel algorithms"
https://bugs.webkit.org/show_bug.cgi?id=228809
https://commits.webkit.org/r280756

Modified Paths

Removed Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (280756 => 280757)


--- trunk/Source/WTF/ChangeLog	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WTF/ChangeLog	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,3 +1,16 @@
+2021-08-07  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r280756.
+        https://bugs.webkit.org/show_bug.cgi?id=228897
+
+        Broke gtk build
+
+        Reverted changeset:
+
+        "Deduplicate logging channel algorithms"
+        https://bugs.webkit.org/show_bug.cgi?id=228809
+        https://commits.webkit.org/r280756
+
 2021-08-07  Myles C. Maxfield  <[email protected]>
 
         Deduplicate logging channel algorithms

Modified: trunk/Source/WTF/WTF.xcodeproj/project.pbxproj (280756 => 280757)


--- trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WTF/WTF.xcodeproj/project.pbxproj	2021-08-07 16:34:40 UTC (rev 280757)
@@ -61,7 +61,6 @@
 		1C181C961D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C181C951D30800A00F5FA16 /* TextBreakIteratorInternalICUCocoa.cpp */; };
 		1C503BE623AAE0AE0072E66B /* LanguageCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C503BE523AAE0AE0072E66B /* LanguageCocoa.mm */; };
 		1CA85CA9241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CA85CA8241B0B260071C2F5 /* RuntimeApplicationChecksCocoa.cpp */; };
-		1CF18F3B26BB579E004B1722 /* LogChannels.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CF18F3926BB579E004B1722 /* LogChannels.cpp */; };
 		1FA47C8A152502DA00568D1B /* WebCoreThread.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1FA47C88152502DA00568D1B /* WebCoreThread.cpp */; };
 		2CCD892A15C0390200285083 /* GregorianDateTime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CCD892915C0390200285083 /* GregorianDateTime.cpp */; };
 		2CDED0EF18115C38004DBA70 /* RunLoopCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CDED0EE18115C38004DBA70 /* RunLoopCF.cpp */; };
@@ -352,8 +351,6 @@
 		1CCDB1491E566626006C73C0 /* TextBreakIteratorCF.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBreakIteratorCF.h; sourceTree = "<group>"; };
 		1CCDB14D1E566898006C73C0 /* TextBreakIteratorICU.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TextBreakIteratorICU.h; sourceTree = "<group>"; };
 		1CCDB1511E566BC5006C73C0 /* CFStringSPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CFStringSPI.h; sourceTree = "<group>"; };
-		1CF18F3926BB579E004B1722 /* LogChannels.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LogChannels.cpp; sourceTree = "<group>"; };
-		1CF18F3A26BB579E004B1722 /* LogChannels.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LogChannels.h; sourceTree = "<group>"; };
 		1FA47C88152502DA00568D1B /* WebCoreThread.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreThread.cpp; sourceTree = "<group>"; };
 		1FA47C89152502DA00568D1B /* WebCoreThread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreThread.h; sourceTree = "<group>"; };
 		24F1B248619F412296D1C19C /* RandomDevice.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomDevice.h; sourceTree = "<group>"; };
@@ -515,8 +512,8 @@
 		9BB91F512648EA4D00A56217 /* CheckedPtr.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CheckedPtr.h; sourceTree = "<group>"; };
 		9BC70F04176C379D00101DEC /* AtomStringTable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AtomStringTable.cpp; sourceTree = "<group>"; };
 		9BD8F40A176C2AD80002D865 /* AtomStringTable.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AtomStringTable.h; sourceTree = "<group>"; };
+		9BF00134267C4CCF00DCFB3F /* CheckedRef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CheckedRef.h; sourceTree = "<group>"; };
 		9BE153352671F00F00C7D096 /* WeakHashMap.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WeakHashMap.h; sourceTree = "<group>"; };
-		9BF00134267C4CCF00DCFB3F /* CheckedRef.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CheckedRef.h; sourceTree = "<group>"; };
 		9C67C542589348E285B49699 /* IndexedContainerIterator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = IndexedContainerIterator.h; sourceTree = "<group>"; };
 		A1B89B87221E000F00EB4CEA /* SDKVariant.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = SDKVariant.xcconfig; sourceTree = "<group>"; };
 		A30D412C1F0DE0BA00B71954 /* SoftLinking.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SoftLinking.h; sourceTree = "<group>"; };
@@ -1125,8 +1122,6 @@
 				0F60F32E1DFCBD1B00416D6C /* LockedPrintStream.h */,
 				A8A472C3151A825A004123FF /* Locker.h */,
 				5311BD551EA7E15A00525281 /* LocklessBag.h */,
-				1CF18F3926BB579E004B1722 /* LogChannels.cpp */,
-				1CF18F3A26BB579E004B1722 /* LogChannels.h */,
 				93B5B45022171EE9004B7AA7 /* Logger.cpp */,
 				077CD86A1FD9CFD200828587 /* Logger.h */,
 				077CD86B1FD9CFD300828587 /* LoggerHelper.h */,
@@ -1743,7 +1738,6 @@
 				C2BCFC551F621F3F00C9222C /* LineEnding.cpp in Sources */,
 				0FE1646A1B6FFC9600400E7C /* Lock.cpp in Sources */,
 				0F60F32F1DFCBD1B00416D6C /* LockedPrintStream.cpp in Sources */,
-				1CF18F3B26BB579E004B1722 /* LogChannels.cpp in Sources */,
 				93B5B45122171EEA004B7AA7 /* Logger.cpp in Sources */,
 				53534F2A1EC0E10E00141B2F /* MachExceptions.defs in Sources */,
 				7A6EBA3420746C34004F9C44 /* MachSendRight.cpp in Sources */,

Modified: trunk/Source/WTF/wtf/CMakeLists.txt (280756 => 280757)


--- trunk/Source/WTF/wtf/CMakeLists.txt	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WTF/wtf/CMakeLists.txt	2021-08-07 16:34:40 UTC (rev 280757)
@@ -123,7 +123,6 @@
     LockedPrintStream.h
     Locker.h
     LocklessBag.h
-    LogChannels.h
     Logger.h
     LoggerHelper.h
     LoggingAccumulator.h
@@ -423,7 +422,6 @@
     LikelyDenseUnsignedIntegerSet.cpp
     Lock.cpp
     LockedPrintStream.cpp
-    LogChannels.cpp
     Logger.cpp
     MainThread.cpp
     MediaTime.cpp

Deleted: trunk/Source/WTF/wtf/LogChannels.cpp (280756 => 280757)


--- trunk/Source/WTF/wtf/LogChannels.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WTF/wtf/LogChannels.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2021 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "LogChannels.h"
-
-#include <wtf/LoggingAccumulator.h>
-
-namespace WTF {
-
-#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-bool LogChannels::isLogChannelEnabled(const String& name)
-{
-    WTFLogChannel* channel = WTFLogChannelByName(m_logChannels.data(), m_logChannels.size(), name.utf8().data());
-    if (!channel)
-        return false;
-    return channel->state != WTFLogChannelState::Off;
-}
-
-void LogChannels::setLogChannelToAccumulate(const String& name)
-{
-    WTFLogChannel* channel = WTFLogChannelByName(m_logChannels.data(), m_logChannels.size(), name.utf8().data());
-    if (!channel)
-        return;
-
-    channel->state = WTFLogChannelState::OnWithAccumulation;
-    m_logChannelsNeedInitialization = true;
-}
-
-void LogChannels::clearAllLogChannelsToAccumulate()
-{
-    resetAccumulatedLogs();
-    for (auto* channel : m_logChannels) {
-        if (channel->state == WTFLogChannelState::OnWithAccumulation)
-            channel->state = WTFLogChannelState::Off;
-    }
-
-    m_logChannelsNeedInitialization = true;
-}
-
-void LogChannels::initializeLogChannelsIfNecessary(std::optional<String> logChannelString)
-{
-    if (!m_logChannelsNeedInitialization && !logChannelString)
-        return;
-
-    m_logChannelsNeedInitialization = false;
-
-    String enabledChannelsString = logChannelString ? logChannelString.value() : logLevelString();
-    WTFInitializeLogChannelStatesFromString(m_logChannels.data(), m_logChannels.size(), enabledChannelsString.utf8().data());
-}
-
-WTFLogChannel* LogChannels::getLogChannel(const String& name)
-{
-    return WTFLogChannelByName(m_logChannels.data(), m_logChannels.size(), name.utf8().data());
-}
-
-#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-} // namespace WTF

Deleted: trunk/Source/WTF/wtf/LogChannels.h (280756 => 280757)


--- trunk/Source/WTF/wtf/LogChannels.h	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WTF/wtf/LogChannels.h	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2021 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <optional>
-#include <wtf/Assertions.h>
-#include <wtf/Forward.h>
-#include <wtf/text/WTFString.h>
-
-namespace WTF {
-
-#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-class LogChannels {
-public:
-    virtual ~LogChannels() = default;
-    virtual String logLevelString() = 0;
-
-    bool isLogChannelEnabled(const String& name);
-    WTF_EXPORT_PRIVATE void setLogChannelToAccumulate(const String& name);
-    WTF_EXPORT_PRIVATE void clearAllLogChannelsToAccumulate();
-    WTF_EXPORT_PRIVATE void initializeLogChannelsIfNecessary(std::optional<String> = std::nullopt);
-    WTF_EXPORT_PRIVATE WTFLogChannel* getLogChannel(const String& name);
-
-protected:
-    Vector<WTFLogChannel*> m_logChannels;
-    bool m_logChannelsNeedInitialization { true };
-};
-
-#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-} // namespace WTF

Modified: trunk/Source/WebCore/ChangeLog (280756 => 280757)


--- trunk/Source/WebCore/ChangeLog	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/ChangeLog	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,3 +1,16 @@
+2021-08-07  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r280756.
+        https://bugs.webkit.org/show_bug.cgi?id=228897
+
+        Broke gtk build
+
+        Reverted changeset:
+
+        "Deduplicate logging channel algorithms"
+        https://bugs.webkit.org/show_bug.cgi?id=228809
+        https://commits.webkit.org/r280756
+
 2021-08-07  Myles C. Maxfield  <[email protected]>
 
         Deduplicate logging channel algorithms

Modified: trunk/Source/WebCore/Sources.txt (280756 => 280757)


--- trunk/Source/WebCore/Sources.txt	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/Sources.txt	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1755,7 +1755,6 @@
 platform/LengthPoint.cpp
 platform/LengthSize.cpp
 platform/LocalizedStrings.cpp
-platform/LogInitialization.cpp
 platform/Logging.cpp
 platform/LowPowerModeNotifier.cpp
 platform/MIMETypeRegistry.cpp

Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (280756 => 280757)


--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj	2021-08-07 16:34:40 UTC (rev 280757)
@@ -6977,7 +6977,6 @@
 		1CE8D12B2618616400FC3AEF /* DisplayListIterator.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = DisplayListIterator.cpp; sourceTree = "<group>"; };
 		1CE8D12C2618616400FC3AEF /* DisplayListIterator.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DisplayListIterator.h; sourceTree = "<group>"; };
 		1CF0BFD42298706800ED2074 /* TextSizeAdjustment.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = TextSizeAdjustment.cpp; sourceTree = "<group>"; };
-		1CF18F3C26BB5AF2004B1722 /* LogInitialization.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LogInitialization.cpp; sourceTree = "<group>"; };
 		1CFAE3220A6D6A3F0032593D /* libobjc.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libobjc.dylib; path = /usr/lib/libobjc.dylib; sourceTree = "<absolute>"; };
 		1D0026A22374D62300CA6CDF /* JSPictureInPictureWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSPictureInPictureWindow.h; sourceTree = "<group>"; };
 		1D0026A32374D62400CA6CDF /* JSPictureInPictureWindow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSPictureInPictureWindow.cpp; sourceTree = "<group>"; };
@@ -27588,7 +27587,6 @@
 				935207BD09BD410A00F2038D /* LocalizedStrings.h */,
 				A8239DFE09B3CF8A00B60641 /* Logging.cpp */,
 				A8239DFF09B3CF8A00B60641 /* Logging.h */,
-				1CF18F3C26BB5AF2004B1722 /* LogInitialization.cpp */,
 				0FDCD7F21D47E655009F08BC /* LogInitialization.h */,
 				46EFAF0F1E5FB9E100E7F34B /* LowPowerModeNotifier.cpp */,
 				46EFAF101E5FB9E100E7F34B /* LowPowerModeNotifier.h */,

Modified: trunk/Source/WebCore/accessibility/AXLogger.cpp (280756 => 280757)


--- trunk/Source/WebCore/accessibility/AXLogger.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/accessibility/AXLogger.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -36,7 +36,6 @@
 #endif
 #include "AXObjectCache.h"
 #include "FrameView.h"
-#include "LogInitialization.h"
 #include "Logging.h"
 #include <wtf/text/TextStream.h>
 

Modified: trunk/Source/WebCore/inspector/agents/page/PageConsoleAgent.cpp (280756 => 280757)


--- trunk/Source/WebCore/inspector/agents/page/PageConsoleAgent.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/inspector/agents/page/PageConsoleAgent.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -35,7 +35,6 @@
 #include "CommandLineAPIHost.h"
 #include "InspectorDOMAgent.h"
 #include "InstrumentingAgents.h"
-#include "LogInitialization.h"
 #include "Logging.h"
 #include "Node.h"
 #include "Page.h"

Modified: trunk/Source/WebCore/page/Page.cpp (280756 => 280757)


--- trunk/Source/WebCore/page/Page.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/page/Page.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -83,7 +83,6 @@
 #include "LegacySchemeRegistry.h"
 #include "LibWebRTCProvider.h"
 #include "LoaderStrategy.h"
-#include "LogInitialization.h"
 #include "Logging.h"
 #include "LowPowerModeNotifier.h"
 #include "MediaCanStartListener.h"

Deleted: trunk/Source/WebCore/platform/LogInitialization.cpp (280756 => 280757)


--- trunk/Source/WebCore/platform/LogInitialization.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/platform/LogInitialization.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,81 +0,0 @@
-/*
- * Copyright (C) 2003-2021 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "LogInitialization.h"
-
-#include "Logging.h"
-#include <wtf/LoggingAccumulator.h>
-#include <wtf/StdLibExtras.h>
-#include <wtf/text/CString.h>
-#include <wtf/text/WTFString.h>
-
-
-#if PLATFORM(COCOA)
-#include <notify.h>
-#include <wtf/BlockPtr.h>
-#endif
-
-namespace WebCore {
-
-#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-class LogChannels final : public WTF::LogChannels {
-public:
-    LogChannels()
-    {
-        m_logChannels = {
-            WEBCORE_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
-        };
-    }
-
-private:
-    String logLevelString() final
-    {
-        return WebCore::logLevelString();
-    }
-};
-
-WTF::LogChannels& logChannels()
-{
-    static NeverDestroyed<LogChannels> logChannels;
-    return logChannels.get();
-}
-
-WTFLogChannel* getLogChannel(const String& name)
-{
-    return logChannels().getLogChannel(name);
-}
-
-#else
-
-WTFLogChannel* getLogChannel(const String& name)
-{
-    return nullptr;
-}
-
-#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-} // namespace WebCore

Modified: trunk/Source/WebCore/platform/LogInitialization.h (280756 => 280757)


--- trunk/Source/WebCore/platform/LogInitialization.h	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/platform/LogInitialization.h	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2010-2021 Apple Inc.  All rights reserved.
+ * Copyright (C) 2003, 2006, 2013, 2015, 2016 Apple Inc.  All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,7 +25,8 @@
 
 #pragma once
 
-#include <wtf/LogChannels.h>
+#include <wtf/Assertions.h>
+#include <wtf/Forward.h>
 #include <wtf/text/WTFString.h>
 
 namespace WebCore {
@@ -32,11 +33,12 @@
 
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
 
-WEBCORE_EXPORT WTF::LogChannels& logChannels();
-String logLevelString();
+WEBCORE_EXPORT String logLevelString();
+bool isLogChannelEnabled(const String& name);
+WEBCORE_EXPORT void setLogChannelToAccumulate(const String& name);
+WEBCORE_EXPORT void clearAllLogChannelsToAccumulate();
+WEBCORE_EXPORT void initializeLogChannelsIfNecessary(std::optional<String> = std::nullopt);
 
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
 
-WEBCORE_EXPORT WTFLogChannel* getLogChannel(const String& name);
-
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/Logging.cpp (280756 => 280757)


--- trunk/Source/WebCore/platform/Logging.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/platform/Logging.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -25,7 +25,18 @@
 
 #include "config.h"
 #include "Logging.h"
+#include "LogInitialization.h"
 
+#include <wtf/LoggingAccumulator.h>
+#include <wtf/StdLibExtras.h>
+#include <wtf/text/CString.h>
+#include <wtf/text/WTFString.h>
+
+#if PLATFORM(COCOA)
+#include <notify.h>
+#include <wtf/BlockPtr.h>
+#endif
+
 namespace WebCore {
 
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
@@ -33,6 +44,67 @@
 #define DEFINE_WEBCORE_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM)
 WEBCORE_LOG_CHANNELS(DEFINE_WEBCORE_LOG_CHANNEL)
 
+static WTFLogChannel* logChannels[] = {
+    WEBCORE_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
+};
+
+static const size_t logChannelCount = WTF_ARRAY_LENGTH(logChannels);
+
+bool isLogChannelEnabled(const String& name)
+{
+    WTFLogChannel* channel = WTFLogChannelByName(logChannels, logChannelCount, name.utf8().data());
+    if (!channel)
+        return false;
+    return channel->state != WTFLogChannelState::Off;
+}
+
+static bool logChannelsNeedInitialization = true;
+
+void setLogChannelToAccumulate(const String& name)
+{
+    WTFLogChannel* channel = WTFLogChannelByName(logChannels, logChannelCount, name.utf8().data());
+    if (!channel)
+        return;
+
+    channel->state = WTFLogChannelState::OnWithAccumulation;
+    logChannelsNeedInitialization = true;
+}
+
+void clearAllLogChannelsToAccumulate()
+{
+    resetAccumulatedLogs();
+    for (auto* channel : logChannels) {
+        if (channel->state == WTFLogChannelState::OnWithAccumulation)
+            channel->state = WTFLogChannelState::Off;
+    }
+
+    logChannelsNeedInitialization = true;
+}
+
+void initializeLogChannelsIfNecessary(std::optional<String> logChannelString)
+{
+    if (!logChannelsNeedInitialization && !logChannelString)
+        return;
+
+    logChannelsNeedInitialization = false;
+
+    String enabledChannelsString = logChannelString ? logChannelString.value() : logLevelString();
+    WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, enabledChannelsString.utf8().data());
+//    LogEventLoop.state = WTFLogChannelState::On;
+}
+
+WTFLogChannel* getLogChannel(const String& name)
+{
+    return WTFLogChannelByName(logChannels, logChannelCount, name.utf8().data());
+}
+
+#else
+
+WTFLogChannel* getLogChannel(const String&)
+{
+    return nullptr;
+}
+
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
 
 } // namespace WebCore

Modified: trunk/Source/WebCore/platform/Logging.h (280756 => 280757)


--- trunk/Source/WebCore/platform/Logging.h	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/platform/Logging.h	2021-08-07 16:34:40 UTC (rev 280757)
@@ -133,4 +133,6 @@
 
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
 
+WEBCORE_EXPORT WTFLogChannel* getLogChannel(const String& name);
+
 } // namespace WebCore

Modified: trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp (280756 => 280757)


--- trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebCore/testing/js/WebCoreTestSupport.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -36,7 +36,6 @@
 #include "JSServiceWorkerInternals.h"
 #include "JSWorkerGlobalScope.h"
 #include "LogInitialization.h"
-#include "Logging.h"
 #include "MockGamepadProvider.h"
 #include "Page.h"
 #include "SWContextManager.h"
@@ -123,7 +122,7 @@
 void setLogChannelToAccumulate(const String& name)
 {
 #if !LOG_DISABLED
-    logChannels().setLogChannelToAccumulate(name);
+    WebCore::setLogChannelToAccumulate(name);
 #else
     UNUSED_PARAM(name);
 #endif
@@ -132,7 +131,7 @@
 void clearAllLogChannelsToAccumulate()
 {
 #if !LOG_DISABLED
-    logChannels().clearAllLogChannelsToAccumulate();
+    WebCore::clearAllLogChannelsToAccumulate();
 #endif
 }
 
@@ -139,7 +138,7 @@
 void initializeLogChannelsIfNecessary()
 {
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-    logChannels().initializeLogChannelsIfNecessary();
+    WebCore::initializeLogChannelsIfNecessary();
 #endif
 }
 

Modified: trunk/Source/WebKit/ChangeLog (280756 => 280757)


--- trunk/Source/WebKit/ChangeLog	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/ChangeLog	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,3 +1,16 @@
+2021-08-07  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r280756.
+        https://bugs.webkit.org/show_bug.cgi?id=228897
+
+        Broke gtk build
+
+        Reverted changeset:
+
+        "Deduplicate logging channel algorithms"
+        https://bugs.webkit.org/show_bug.cgi?id=228809
+        https://commits.webkit.org/r280756
+
 2021-08-07  Myles C. Maxfield  <[email protected]>
 
         Deduplicate logging channel algorithms

Modified: trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp (280756 => 280757)


--- trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/GPUProcess/GPUConnectionToWebProcess.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -64,7 +64,6 @@
 #include "WebCoreArgumentCoders.h"
 #include "WebErrors.h"
 #include "WebProcessMessages.h"
-#include <WebCore/LogInitialization.h>
 #include <WebCore/Logging.h>
 #include <WebCore/MockRealtimeMediaSourceCenter.h>
 #include <WebCore/NowPlayingManager.h>

Modified: trunk/Source/WebKit/GPUProcess/GPUProcess.cpp (280756 => 280757)


--- trunk/Source/WebKit/GPUProcess/GPUProcess.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/GPUProcess/GPUProcess.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -243,8 +243,8 @@
 #endif
 
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-    WebCore::logChannels().initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels);
-    WebKit::logChannels().initializeLogChannelsIfNecessary(parameters.webKitLoggingChannels);
+    WebCore::initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels);
+    WebKit::initializeLogChannelsIfNecessary(parameters.webKitLoggingChannels);
 #endif
 
     // Match the QoS of the UIProcess since the GPU process is doing rendering on its behalf.

Deleted: trunk/Source/WebKit/Platform/LogInitialization.cpp (280756 => 280757)


--- trunk/Source/WebKit/Platform/LogInitialization.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/Platform/LogInitialization.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "LogInitialization.h"
-
-#include "Logging.h"
-#include <wtf/text/CString.h>
-
-namespace WebKit {
-
-#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-class LogChannels final : public WTF::LogChannels {
-public:
-    LogChannels()
-    {
-        m_logChannels = {
-            WEBKIT2_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
-        };
-    }
-
-private:
-    String logLevelString() final
-    {
-        return WebKit::logLevelString();
-    }
-};
-
-WTF::LogChannels& logChannels()
-{
-    static NeverDestroyed<LogChannels> logChannels;
-    return logChannels.get();
-}
-
-WTFLogChannel* getLogChannel(const String& name)
-{
-    return logChannels().getLogChannel(name);
-}
-
-#else
-
-WTFLogChannel* getLogChannel(const String& name)
-{
-    return nullptr;
-}
-
-#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-} // namespace WebKit

Modified: trunk/Source/WebKit/Platform/LogInitialization.h (280756 => 280757)


--- trunk/Source/WebKit/Platform/LogInitialization.h	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/Platform/LogInitialization.h	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 Apple Inc.  All rights reserved.
+ * Copyright (C) 2010, 2013, 2016 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -25,18 +25,15 @@
 
 #pragma once
 
-#include <wtf/LogChannels.h>
 #include <wtf/text/WTFString.h>
 
+#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
+
 namespace WebKit {
 
-#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-WTF::LogChannels& logChannels();
+void initializeLogChannelsIfNecessary(std::optional<String> = std::nullopt);
 String logLevelString();
 
+} // namespace WebKit
+
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-WTFLogChannel* getLogChannel(const String& name);
-
-} // namespace WebKit

Modified: trunk/Source/WebKit/Platform/Logging.cpp (280756 => 280757)


--- trunk/Source/WebKit/Platform/Logging.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/Platform/Logging.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2010, 2013 Apple Inc. All rights reserved.
  * Copyright (C) 2011 Samsung Electronics
  *
  * Redistribution and use in source and binary forms, with or without
@@ -26,10 +26,40 @@
 
 #include "config.h"
 #include "Logging.h"
+#include "LogInitialization.h"
 
+#include <wtf/text/CString.h>
+
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
 
 #define DEFINE_WEBKIT2_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM)
 WEBKIT2_LOG_CHANNELS(DEFINE_WEBKIT2_LOG_CHANNEL)
 
+static WTFLogChannel* logChannels[] = {
+    WEBKIT2_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
+};
+
+namespace WebKit {
+
+static const size_t logChannelCount = WTF_ARRAY_LENGTH(logChannels);
+static bool logChannelsNeedInitialization = true;
+
+void initializeLogChannelsIfNecessary(std::optional<String> logChannelString)
+{
+    if (!logChannelsNeedInitialization && !logChannelString)
+        return;
+
+    logChannelsNeedInitialization = false;
+
+    String enabledChannelsString = logChannelString ? logChannelString.value() : logLevelString();
+    WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, enabledChannelsString.utf8().data());
+}
+
+WTFLogChannel* getLogChannel(const String& name)
+{
+    return WTFLogChannelByName(logChannels, logChannelCount, name.utf8().data());
+}
+
+} // namespace WebKit
+
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED

Modified: trunk/Source/WebKit/Platform/Logging.h (280756 => 280757)


--- trunk/Source/WebKit/Platform/Logging.h	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/Platform/Logging.h	2021-08-07 16:34:40 UTC (rev 280757)
@@ -112,8 +112,13 @@
 
 #undef DECLARE_LOG_CHANNEL
 
+namespace WebKit {
+WTFLogChannel* getLogChannel(const String&);
+} // namespace WebKit
+
 #ifdef __cplusplus
 }
 #endif
 
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
+

Modified: trunk/Source/WebKit/Shared/AuxiliaryProcess.cpp (280756 => 280757)


--- trunk/Source/WebKit/Shared/AuxiliaryProcess.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/Shared/AuxiliaryProcess.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -82,8 +82,8 @@
     initializeSandbox(parameters, sandboxParameters);
 
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-    WebCore::logChannels().initializeLogChannelsIfNecessary();
-    WebKit::logChannels().initializeLogChannelsIfNecessary();
+    WebCore::initializeLogChannelsIfNecessary();
+    WebKit::initializeLogChannelsIfNecessary();
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
 
     initializeProcessName(parameters);

Modified: trunk/Source/WebKit/Shared/WebKit2Initialize.cpp (280756 => 280757)


--- trunk/Source/WebKit/Shared/WebKit2Initialize.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/Shared/WebKit2Initialize.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -47,8 +47,8 @@
     WTF::RefCountedBase::enableThreadingChecksGlobally();
 
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-    WebCore::logChannels().initializeLogChannelsIfNecessary();
-    WebKit::logChannels().initializeLogChannelsIfNecessary();
+    WebCore::initializeLogChannelsIfNecessary();
+    WebKit::initializeLogChannelsIfNecessary();
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
 
     WebCore::populateJITOperations();

Modified: trunk/Source/WebKit/Sources.txt (280756 => 280757)


--- trunk/Source/WebKit/Sources.txt	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/Sources.txt	2021-08-07 16:34:40 UTC (rev 280757)
@@ -135,7 +135,6 @@
 NetworkProcess/webrtc/RTCDataChannelRemoteManagerProxy.cpp
 
 // TODO: We should unify these files once GTK's PluginProcess2 is removed.
-Platform/LogInitialization.cpp @no-unify
 Platform/Logging.cpp @no-unify
 Platform/Module.cpp @no-unify
 Platform/SharedMemory.cpp @no-unify

Modified: trunk/Source/WebKit/UIProcess/WebPageProxy.cpp (280756 => 280757)


--- trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/UIProcess/WebPageProxy.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -68,7 +68,6 @@
 #include "FrameInfoData.h"
 #include "LegacyGlobalSettings.h"
 #include "LoadParameters.h"
-#include "LogInitialization.h"
 #include "Logging.h"
 #include "NativeWebGestureEvent.h"
 #include "NativeWebKeyboardEvent.h"

Modified: trunk/Source/WebKit/UIProcess/WebProcessPool.cpp (280756 => 280757)


--- trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/UIProcess/WebProcessPool.cpp	2021-08-07 16:34:40 UTC (rev 280757)
@@ -251,8 +251,8 @@
     resolvePathsForSandboxExtensions();
 
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-    WebCore::logChannels().initializeLogChannelsIfNecessary();
-    WebKit::logChannels().initializeLogChannelsIfNecessary();
+    WebCore::initializeLogChannelsIfNecessary();
+    WebKit::initializeLogChannelsIfNecessary();
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
 
 #ifndef NDEBUG

Modified: trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj (280756 => 280757)


--- trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj	2021-08-07 16:34:40 UTC (rev 280757)
@@ -3,7 +3,7 @@
 	archiveVersion = 1;
 	classes = {
 	};
-	objectVersion = 54;
+	objectVersion = 52;
 	objects = {
 
 /* Begin PBXAggregateTarget section */
@@ -441,7 +441,6 @@
 		1CA8B946127C882A00576C2B /* WebInspectorUIProxyMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CA8B944127C882A00576C2B /* WebInspectorUIProxyMessages.h */; };
 		1CBBE4A019B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */; };
 		1CBBE4A119B66C53006B7D81 /* WebInspectorUIMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */; };
-		1CF18F3F26BB5D95004B1722 /* LogInitialization.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1CF18F3E26BB5D90004B1722 /* LogInitialization.cpp */; };
 		1D4D737023A9E54700717A25 /* RemoteMediaResourceManagerMessageReceiver.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1D4D736B23A9DF5500717A25 /* RemoteMediaResourceManagerMessageReceiver.cpp */; };
 		1D4D737123A9E56200717A25 /* RemoteMediaResourceManagerMessages.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D4D736C23A9DF6000717A25 /* RemoteMediaResourceManagerMessages.h */; };
 		1D4D737623A9ED1800717A25 /* RemoteMediaResourceManagerMessagesReplies.h in Headers */ = {isa = PBXBuildFile; fileRef = 1D4D737523A9EB6800717A25 /* RemoteMediaResourceManagerMessagesReplies.h */; };
@@ -3050,7 +3049,6 @@
 		1CA8B944127C882A00576C2B /* WebInspectorUIProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorUIProxyMessages.h; path = DerivedSources/WebKit2/WebInspectorUIProxyMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };
 		1CBBE49E19B66C53006B7D81 /* WebInspectorUIMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebInspectorUIMessageReceiver.cpp; path = DerivedSources/WebKit2/WebInspectorUIMessageReceiver.cpp; sourceTree = BUILT_PRODUCTS_DIR; };
 		1CBBE49F19B66C53006B7D81 /* WebInspectorUIMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebInspectorUIMessages.h; path = DerivedSources/WebKit2/WebInspectorUIMessages.h; sourceTree = BUILT_PRODUCTS_DIR; };
-		1CF18F3E26BB5D90004B1722 /* LogInitialization.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = LogInitialization.cpp; sourceTree = "<group>"; };
 		1D0530C9258EAB4400E436F7 /* combine-feature-flags-plist.py */ = {isa = PBXFileReference; lastKnownFileType = text.script.python; path = "combine-feature-flags-plist.py"; sourceTree = "<group>"; };
 		1D0530D1259162C800E436F7 /* WebKit-ios.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "WebKit-ios.plist"; sourceTree = "<group>"; };
 		1D0530D2259162C900E436F7 /* WebKit-appletvos.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "WebKit-appletvos.plist"; sourceTree = "<group>"; };
@@ -6002,6 +6000,7 @@
 		F40BBB40257FF46E0067463A /* GPUProcessWakeupMessageArguments.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GPUProcessWakeupMessageArguments.h; sourceTree = "<group>"; };
 		F40D1B68220BDC0F00B49A01 /* WebAutocorrectionContext.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = WebAutocorrectionContext.h; path = ios/WebAutocorrectionContext.h; sourceTree = "<group>"; };
 		F41056612130699A0092281D /* APIAttachmentCocoa.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = APIAttachmentCocoa.mm; sourceTree = "<group>"; };
+		F414CE2A269DDED100BD216A /* GPUProcessCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = GPUProcessCocoa.mm; path = cocoa/GPUProcessCocoa.mm; sourceTree = "<group>"; };
 		F414CE2C269DE6EA00BD216A /* RemoteRenderingBackendState.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = RemoteRenderingBackendState.h; sourceTree = "<group>"; };
 		F42D633F22A0EFD300D2FB3A /* WebAutocorrectionData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebAutocorrectionData.h; path = ios/WebAutocorrectionData.h; sourceTree = "<group>"; };
 		F42D634022A0EFD300D2FB3A /* WebAutocorrectionData.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebAutocorrectionData.mm; path = ios/WebAutocorrectionData.mm; sourceTree = "<group>"; };
@@ -10698,7 +10697,6 @@
 				ECBFC1DB1E6A4D66000300C7 /* ExtraPublicSymbolsForTAPI.h */,
 				51A7F2F4125BF8D4008AEB1D /* Logging.cpp */,
 				51A7F2F2125BF820008AEB1D /* Logging.h */,
-				1CF18F3E26BB5D90004B1722 /* LogInitialization.cpp */,
 				0FDCD7F61D47E92A009F08BC /* LogInitialization.h */,
 				C0E3AA451209E2BA00A49D01 /* Module.cpp */,
 				C0E3AA441209E2BA00A49D01 /* Module.h */,
@@ -11718,6 +11716,14 @@
 			path = cache;
 			sourceTree = "<group>";
 		};
+		F414CE27269DDE8000BD216A /* cocoa */ = {
+			isa = PBXGroup;
+			children = (
+				F414CE2A269DDED100BD216A /* GPUProcessCocoa.mm */,
+			);
+			name = cocoa;
+			sourceTree = "<group>";
+		};
 		F638955A133BF57D008941D5 /* mac */ = {
 			isa = PBXGroup;
 			children = (
@@ -14229,7 +14235,6 @@
 				51F060E11654318500F3281C /* LibWebRTCNetworkMessageReceiver.cpp in Sources */,
 				449D90DA21FDC30B00F677C0 /* LocalAuthenticationSoftLink.mm in Sources */,
 				2D92A779212B6A6100F493FD /* Logging.cpp in Sources */,
-				1CF18F3F26BB5D95004B1722 /* LogInitialization.cpp in Sources */,
 				07E19EFB23D401F10094FFB4 /* MediaPlayerPrivateRemoteMessageReceiver.cpp in Sources */,
 				1DF29E64257F37A3003C28AF /* MediaSourcePrivateRemoteMessageReceiver.cpp in Sources */,
 				9B4790912531563200EC11AB /* MessageArgumentDescriptions.cpp in Sources */,

Modified: trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm (280756 => 280757)


--- trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm	2021-08-07 16:34:40 UTC (rev 280757)
@@ -281,8 +281,8 @@
     }
 
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-    WebCore::logChannels().initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels);
-    WebKit::logChannels().initializeLogChannelsIfNecessary(parameters.webKitLoggingChannels);
+    WebCore::initializeLogChannelsIfNecessary(parameters.webCoreLoggingChannels);
+    WebKit::initializeLogChannelsIfNecessary(parameters.webKitLoggingChannels);
 #endif
 
     m_uiProcessBundleIdentifier = parameters.uiProcessBundleIdentifier;

Modified: trunk/Source/WebKitLegacy/ChangeLog (280756 => 280757)


--- trunk/Source/WebKitLegacy/ChangeLog	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/ChangeLog	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,3 +1,16 @@
+2021-08-07  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r280756.
+        https://bugs.webkit.org/show_bug.cgi?id=228897
+
+        Broke gtk build
+
+        Reverted changeset:
+
+        "Deduplicate logging channel algorithms"
+        https://bugs.webkit.org/show_bug.cgi?id=228809
+        https://commits.webkit.org/r280756
+
 2021-08-07  Myles C. Maxfield  <[email protected]>
 
         Deduplicate logging channel algorithms

Modified: trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj (280756 => 280757)


--- trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/WebKitLegacy.xcodeproj/project.pbxproj	2021-08-07 16:34:40 UTC (rev 280757)
@@ -111,7 +111,6 @@
 		1C68F672095B5FC100C2984E /* WebNodeHighlightView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1C68F666095B5FC100C2984E /* WebNodeHighlightView.mm */; };
 		1C7B0C660EB2464D00A28502 /* WebInspectorClientCF.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1C7B0C650EB2464D00A28502 /* WebInspectorClientCF.cpp */; };
 		1C8CB07A0AE9830C00B1F6E9 /* WebEditingDelegatePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C8CB0790AE9830C00B1F6E9 /* WebEditingDelegatePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
-		1CF18F4126BB71B7004B1722 /* WebKitLogInitialization.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1CF18F4026BB71B7004B1722 /* WebKitLogInitialization.mm */; };
 		22F219CC08D236730030E078 /* WebBackForwardListPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = 22F219CB08D236730030E078 /* WebBackForwardListPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
 		29AEF960134C76FB00FE5096 /* OutlookQuirksUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = 29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */; };
 		2D25396618CE85C200270222 /* WebSharingServicePickerController.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D25396418CE85C200270222 /* WebSharingServicePickerController.h */; };
@@ -832,8 +831,6 @@
 		1C904FD30BA9DD0F0081E9D0 /* Version.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Version.xcconfig; sourceTree = "<group>"; };
 		1C904FD40BA9DD0F0081E9D0 /* DebugRelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = DebugRelease.xcconfig; sourceTree = "<group>"; };
 		1C904FD50BA9DD0F0081E9D0 /* Base.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = Base.xcconfig; sourceTree = "<group>"; };
-		1CF18F4026BB71B7004B1722 /* WebKitLogInitialization.mm */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.objcpp; path = WebKitLogInitialization.mm; sourceTree = "<group>"; };
-		1CF18F4226BB71D3004B1722 /* WebKitLogInitialization.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebKitLogInitialization.h; sourceTree = "<group>"; };
 		22F219CB08D236730030E078 /* WebBackForwardListPrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebBackForwardListPrivate.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		2568C72C0174912D0ECA149E /* WebKit.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebKit.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
 		29AEF95D134C755400FE5096 /* OutlookQuirksUserScript.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode._javascript_; path = OutlookQuirksUserScript.js; sourceTree = "<group>"; };
@@ -1790,8 +1787,6 @@
 				5365AED92566345800704679 /* WebKitLegacy_Private.h */,
 				93AEB17D032C1735008635CE /* WebKitLogging.h */,
 				93AEB17E032C1735008635CE /* WebKitLogging.m */,
-				1CF18F4226BB71D3004B1722 /* WebKitLogInitialization.h */,
-				1CF18F4026BB71B7004B1722 /* WebKitLogInitialization.mm */,
 				7082F56F038EADAA00A80180 /* WebKitNSStringExtras.h */,
 				7082F570038EADAA00A80180 /* WebKitNSStringExtras.mm */,
 				F53444CE02E87CBA018635CA /* WebKitStatistics.h */,
@@ -3656,7 +3651,6 @@
 				939811030824BF01008DF038 /* WebKitErrors.m in Sources */,
 				CD8BFCE715531224005AFB25 /* WebKitFullScreenListener.mm in Sources */,
 				939810C30824BF01008DF038 /* WebKitLogging.m in Sources */,
-				1CF18F4126BB71B7004B1722 /* WebKitLogInitialization.mm in Sources */,
 				939810C40824BF01008DF038 /* WebKitNSStringExtras.mm in Sources */,
 				1AAF5D0F0EDDE7A7008D883D /* WebKitPluginAgent.defs in Sources */,
 				1AAF5D000EDDE604008D883D /* WebKitPluginClient.defs in Sources */,

Modified: trunk/Source/WebKitLegacy/mac/ChangeLog (280756 => 280757)


--- trunk/Source/WebKitLegacy/mac/ChangeLog	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/mac/ChangeLog	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,3 +1,16 @@
+2021-08-07  Commit Queue  <[email protected]>
+
+        Unreviewed, reverting r280756.
+        https://bugs.webkit.org/show_bug.cgi?id=228897
+
+        Broke gtk build
+
+        Reverted changeset:
+
+        "Deduplicate logging channel algorithms"
+        https://bugs.webkit.org/show_bug.cgi?id=228809
+        https://commits.webkit.org/r280756
+
 2021-08-07  Myles C. Maxfield  <[email protected]>
 
         Deduplicate logging channel algorithms

Deleted: trunk/Source/WebKitLegacy/mac/Misc/WebKitLogInitialization.h (280756 => 280757)


--- trunk/Source/WebKitLegacy/mac/Misc/WebKitLogInitialization.h	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebKitLogInitialization.h	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2021 Apple Inc.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
- * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
- * THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <wtf/LogChannels.h>
-#include <wtf/text/WTFString.h>
-
-namespace WebKit {
-
-#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-WTF::LogChannels& logChannels();
-
-#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-WTFLogChannel* getLogChannel(const String& name);
-
-} // namespace WebKit
-
-void ReportDiscardedDelegateException(SEL delegateSelector, id exception);

Deleted: trunk/Source/WebKitLegacy/mac/Misc/WebKitLogInitialization.mm (280756 => 280757)


--- trunk/Source/WebKitLegacy/mac/Misc/WebKitLogInitialization.mm	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebKitLogInitialization.mm	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,74 +0,0 @@
-/*
- * Copyright (C) 2005-2021 Apple Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- * 1.  Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- * 2.  Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in the
- *     documentation and/or other materials provided with the distribution.
- * 3.  Neither the name of Apple Inc. ("Apple") nor the names of
- *     its contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
- * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
- * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
- * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "WebKitLogInitialization.h"
-
-#include "WebKitLogging.h"
-#include <wtf/text/CString.h>
-
-namespace WebKit {
-
-#if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-class LogChannels final : public WTF::LogChannels {
-public:
-    LogChannels()
-    {
-        m_logChannels = {
-            WEBKIT_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
-        };
-    }
-
-private:
-    String logLevelString() final
-    {
-        static NSString * const defaultsDomain = @"WebKitLogging";
-        return [[NSUserDefaults standardUserDefaults] stringForKey:defaultsDomain];
-    }
-};
-
-WTF::LogChannels& logChannels()
-{
-    static NeverDestroyed<LogChannels> logChannels;
-    return logChannels.get();
-}
-
-#endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
-
-} // namespace WebKit
-
-void ReportDiscardedDelegateException(SEL delegateSelector, id exception)
-{
-    if ([exception isKindOfClass:[NSException class]]) {
-        NSLog(@"*** WebKit discarded an uncaught exception in the %s delegate: <%@> %@",
-            sel_getName(delegateSelector), [exception name], [exception reason]);
-    } else {
-        NSLog(@"*** WebKit discarded an uncaught exception in the %s delegate: %@",
-            sel_getName(delegateSelector), exception);
-    }
-}

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebKitLogging.h (280756 => 280757)


--- trunk/Source/WebKitLegacy/mac/Misc/WebKitLogging.h	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebKitLogging.h	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2007, 2008, 2013 Apple Inc. All rights reserved.
  *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
@@ -68,8 +68,11 @@
 
 #undef DECLARE_LOG_CHANNEL
 
+void WebKitInitializeLogChannelsIfNecessary(void);
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
 
+void ReportDiscardedDelegateException(SEL delegateSelector, id exception);
+
 #ifdef __cplusplus
 }
 #endif

Modified: trunk/Source/WebKitLegacy/mac/Misc/WebKitLogging.m (280756 => 280757)


--- trunk/Source/WebKitLegacy/mac/Misc/WebKitLogging.m	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/mac/Misc/WebKitLogging.m	2021-08-07 16:34:40 UTC (rev 280757)
@@ -33,4 +33,37 @@
 #define DEFINE_WEBKIT_LOG_CHANNEL(name) DEFINE_LOG_CHANNEL(name, LOG_CHANNEL_WEBKIT_SUBSYSTEM)
 WEBKIT_LOG_CHANNELS(DEFINE_WEBKIT_LOG_CHANNEL)
 
+static WTFLogChannel* logChannels[] = {
+    WEBKIT_LOG_CHANNELS(LOG_CHANNEL_ADDRESS)
+};
+
+static const size_t logChannelCount = sizeof(logChannels) / sizeof(logChannels[0]);
+
+
+static NSString * const defaultsDomain = @"WebKitLogging";
+
+void WebKitInitializeLogChannelsIfNecessary()
+{
+    static bool haveInitializedLoggingChannels = false;
+    if (haveInitializedLoggingChannels)
+        return;
+    haveInitializedLoggingChannels = true;
+
+    NSString *logLevel = [[NSUserDefaults standardUserDefaults] stringForKey:defaultsDomain];
+    if (!logLevel)
+        return;
+    
+    WTFInitializeLogChannelStatesFromString(logChannels, logChannelCount, [logLevel UTF8String]);
+}
+
 #endif // !LOG_DISABLED || !RELEASE_LOG_DISABLED
+
+void ReportDiscardedDelegateException(SEL delegateSelector, id exception)
+{
+    if ([exception isKindOfClass:[NSException class]])
+        NSLog(@"*** WebKit discarded an uncaught exception in the %s delegate: <%@> %@",
+            sel_getName(delegateSelector), [exception name], [exception reason]);
+    else
+        NSLog(@"*** WebKit discarded an uncaught exception in the %s delegate: %@",
+            sel_getName(delegateSelector), exception);
+}

Modified: trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm (280756 => 280757)


--- trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebDragClient.mm	2021-08-07 16:34:40 UTC (rev 280757)
@@ -34,7 +34,6 @@
 #import "WebFrameInternal.h"
 #import "WebFrameView.h"
 #import "WebHTMLViewInternal.h"
-#import "WebKitLogInitialization.h"
 #import "WebKitLogging.h"
 #import "WebKitNSStringExtras.h"
 #import "WebNSURLExtras.h"

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebDelegateImplementationCaching.mm (280756 => 280757)


--- trunk/Source/WebKitLegacy/mac/WebView/WebDelegateImplementationCaching.mm	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebDelegateImplementationCaching.mm	2021-08-07 16:34:40 UTC (rev 280757)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2021 Apple Inc. All rights reserved.
+ * Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
  * Copyright (C) 2006 David Smith ([email protected])
  *
  * Redistribution and use in source and binary forms, with or without
@@ -29,7 +29,6 @@
 
 #import "WebDelegateImplementationCaching.h"
 
-#import "WebKitLogInitialization.h"
 #import "WebKitLogging.h"
 #import "WebView.h"
 #import "WebViewData.h"

Modified: trunk/Source/WebKitLegacy/mac/WebView/WebView.mm (280756 => 280757)


--- trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2021-08-07 07:54:50 UTC (rev 280756)
+++ trunk/Source/WebKitLegacy/mac/WebView/WebView.mm	2021-08-07 16:34:40 UTC (rev 280757)
@@ -81,7 +81,6 @@
 #import "WebInspectorClient.h"
 #import "WebKitErrors.h"
 #import "WebKitFullScreenListener.h"
-#import "WebKitLogInitialization.h"
 #import "WebKitLogging.h"
 #import "WebKitNSStringExtras.h"
 #import "WebKitStatisticsPrivate.h"
@@ -1481,8 +1480,8 @@
 #endif
     if (!didOneTimeInitialization) {
 #if !LOG_DISABLED || !RELEASE_LOG_DISABLED
-        WebCore::logChannels().initializeLogChannelsIfNecessary();
-        WebKit::logChannels().initializeLogChannelsIfNecessary();
+        WebKitInitializeLogChannelsIfNecessary();
+        WebCore::initializeLogChannelsIfNecessary();
 #endif
 
         // Initialize our platform strategies first before invoking the rest
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to