Bug 228809

Summary: Deduplicate logging channel algorithms
Product: WebKit Reporter: Myles C. Maxfield <mmaxfield>
Component: New BugsAssignee: Myles C. Maxfield <mmaxfield>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, aboxhall, andresg_22, annulen, apinheiro, benjamin, cdumez, cfleizach, cmarcelo, commit-queue, ddkilzer, dmazzoni, ews-watchlist, gyuyoung.kim, hi, Hironori.Fujii, jcraig, jdiggs, joepeck, ryuan.choi, samuel_white, sergio, simon.fraser, webkit-bot-watchers-bugzilla, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 228897    
Bug Blocks: 228768, 228899    
Attachments:
Description Flags
Patch
Hironori.Fujii: review+, ews-feeder: commit-queue-
Patch for committing
ews-feeder: commit-queue-
Patch for committing none

Description Myles C. Maxfield 2021-08-04 19:29:08 PDT
Deduplicate logging channel algorithms
Comment 1 Myles C. Maxfield 2021-08-05 19:57:12 PDT
Created attachment 435051 [details]
Patch
Comment 2 Fujii Hironori 2021-08-06 14:40:34 PDT
Comment on attachment 435051 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=435051&action=review

> Source/WTF/wtf/LogChannels.cpp:37
> +    WTFLogChannel* channel = WTFLogChannelByName(m_logChannels.data(), m_logChannels.size(), name.utf8().data());

You can use getLogChannel(name) here.

> Source/WTF/wtf/LogChannels.cpp:45
> +    WTFLogChannel* channel = WTFLogChannelByName(m_logChannels.data(), m_logChannels.size(), name.utf8().data());

Ditto.
Comment 3 Fujii Hironori 2021-08-06 14:44:47 PDT
Comment on attachment 435051 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=435051&action=review

> Source/WebCore/platform/LogInitialization.cpp:32
> +#include <wtf/text/CString.h>

Do you really use <wtf/text/CString.h> in this file?

> Source/WebCore/platform/LogInitialization.cpp:36
> +#if PLATFORM(COCOA)

Do you really need Cocoa specific headers in this file?
Comment 5 Fujii Hironori 2021-08-06 14:52:45 PDT
Comment on attachment 435051 [details]
Patch

Nice refactoring. LGTM. But, cq- for the GTK build problem.
Comment 6 Myles C. Maxfield 2021-08-06 20:05:34 PDT
Created attachment 435110 [details]
Patch for committing
Comment 7 Myles C. Maxfield 2021-08-06 23:40:08 PDT
Created attachment 435119 [details]
Patch for committing
Comment 8 Myles C. Maxfield 2021-08-07 00:55:03 PDT
Committed r280756 (240341@main): <https://commits.webkit.org/240341@main>
Comment 9 Radar WebKit Bug Importer 2021-08-07 00:56:17 PDT
<rdar://problem/81647472>
Comment 10 Aakash Jain 2021-08-07 09:26:09 PDT
(In reply to Myles C. Maxfield from comment #8)
> Committed r280756 (240341@main): <https://commits.webkit.org/240341@main>
This seems to have broken GTK build.
e.g.:
https://build.webkit.org/#/builders/41/builds/4806 passed with 240340@main
https://build.webkit.org/#/builders/41/builds/4807 failed with 240341@main
Comment 11 WebKit Commit Bot 2021-08-07 09:27:49 PDT
Re-opened since this is blocked by bug 228897
Comment 12 Myles C. Maxfield 2021-08-07 11:15:58 PDT
Oh, somehow the patch I committed didn't include the fix for GTK! The Patch for committing above includes a change to Threading.h but r280756 doesn't.

Let's try this again, with the fully updated patch this time.
Comment 13 EWS 2021-08-07 11:50:23 PDT
Committed r280758 (240343@main): <https://commits.webkit.org/240343@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 435119 [details].
Comment 14 Myles C. Maxfield 2021-08-07 11:55:35 PDT
Watching the GTK bot now...
Comment 15 David Kilzer (:ddkilzer) 2021-09-12 12:45:14 PDT
(In reply to EWS from comment #13)
> Committed r280758 (240343@main): <https://commits.webkit.org/240343@main>
> 
> All reviewed patches have been landed. Closing bug and clearing flags on
> attachment 435119 [details].

Follow-up fix to the WebKit Xcode project:

    REGRESSION (r280758): WebKit project won't open in Xcode 11.4
    <https://trac.webkit.org/changeset/282317/webkit>