Bug 232931 - [GLib] Developer build with release logs disabled fails
Summary: [GLib] Developer build with release logs disabled fails
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Platform (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Philippe Normand
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-11-10 01:43 PST by Philippe Normand
Modified: 2021-11-12 07:45 PST (History)
9 users (show)

See Also:


Attachments
[fast-cq] Patch (1.72 KB, patch)
2021-11-10 01:45 PST, Philippe Normand
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Normand 2021-11-10 01:43:16 PST
In Internals.cpp we require convertEnumerationToString(PlatformMediaSession::RemoteControlCommandType) but that is guarded by an ifdef in PlatformMediaSession.
Comment 1 Philippe Normand 2021-11-10 01:45:12 PST
Created attachment 443785 [details]
[fast-cq] Patch
Comment 2 Adrian Perez 2021-11-11 05:53:27 PST
Comment on attachment 443785 [details]
[fast-cq] Patch

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

> Source/WebCore/ChangeLog:9
> +        functions, required by Internals.

This looks adjacent to the issue from bug #226088 — I didn't get to the
bottom of it, but there we run in a multiple definition issue due to the
same method (exactly the same!) being generated from a WebIDL file. Why is
this not a problem here? Is something latent here being hidden as well by
unified builds, I wonder?
Comment 3 Philippe Normand 2021-11-11 06:30:19 PST
I don't think it's related with unified builds, if you open PlatformMediaSession.h you'll see, not guarded by ifdef:

WEBCORE_EXPORT String convertEnumerationToString(PlatformMediaSession::RemoteControlCommandType);

But in the cpp unit it is currently guarded by an ifdef, hence the link error happening when MEDIA_SESSION is enabled, but release logs are disabled.
Comment 4 Adrian Perez 2021-11-12 07:10:45 PST
(In reply to Philippe Normand from comment #3)
> I don't think it's related with unified builds, if you open
> PlatformMediaSession.h you'll see, not guarded by ifdef:
> 
> WEBCORE_EXPORT String
> convertEnumerationToString(PlatformMediaSession::RemoteControlCommandType);
> 
> But in the cpp unit it is currently guarded by an ifdef, hence the link
> error happening when MEDIA_SESSION is enabled, but release logs are disabled.

It's only related in that I am trying to solve another bug that happens to
result in multiple definitions of this symbol when unified builds are
disabled because my test builds I typically do with logging enabled so
the function was being compiled in my case, too — but that's all.
Comment 5 EWS 2021-11-12 07:44:37 PST
Committed r285718 (244177@main): <https://commits.webkit.org/244177@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 443785 [details].
Comment 6 Radar WebKit Bug Importer 2021-11-12 07:45:21 PST
<rdar://problem/85343300>