Bug 274297 - Stop using `const char*` in string concatenations
Summary: Stop using `const char*` in string concatenations
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Diego Pino
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2024-05-16 21:33 PDT by Chris Dumez
Modified: 2024-07-09 02:09 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Dumez 2024-05-16 21:33:28 PDT
Stop using `const char*` in string concatenations, to encourage the use of ASCIILiteral and std::span.
Comment 1 Chris Dumez 2024-05-17 07:49:59 PDT
Pull request: https://github.com/WebKit/WebKit/pull/28707
Comment 2 EWS 2024-05-19 17:11:03 PDT
Committed 278972@main (1cf337e0a50a): <https://commits.webkit.org/278972@main>

Reviewed commits have been landed. Closing PR #28707 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2024-05-19 17:12:15 PDT
<rdar://problem/128366439>
Comment 4 Diego Pino 2024-05-20 23:10:58 PDT
GTK-Linux-64bit-Release-Packaging-Nightly-Ubuntu2004 fails with the following error:

https://build.webkit.org/#/builders/30/builds/8960

(this bot builds with libwebrtc)

```
../../../Source/WebCore/platform/mediastream/libwebrtc/gstreamer/GStreamerVideoEncoderFactory.cpp:121:91:   required from here
WTF/Headers/wtf/text/StringConcatenate.h:534:38: error: invalid use of incomplete type ‘class WTF::StringTypeAdapter<const char*, void>’
  534 |     return tryMakeStringFromAdapters(StringTypeAdapter<StringTypes>(strings)...);
      |                                      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from WTF/Headers/wtf/text/IntegerToStringConversion.h:27,
                 from WTF/Headers/wtf/text/WTFString.h:27,
                 from ../../../Source/WebCore/dom/Exception.h:30,
                 from ../../../Source/WebCore/dom/ExceptionOr.h:29,
                 from ../../../Source/WebCore/platform/mediastream/RTCDTMFSenderBackend.h:29,
                 from ../../../Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.h:30,
                 from ../../../Source/WebCore/platform/mediastream/libwebrtc/LibWebRTCDTMFSenderBackend.cpp:27,
                 from WebCore/DerivedSources/unified-sources/UnifiedSource-3c72abbe-74.cpp:1:
WTF/Headers/wtf/Forward.h:106:43: note: declaration of ‘class WTF::StringTypeAdapter<const char*, void>’
  106 | template<typename, typename = void> class StringTypeAdapter;
      |                                           ^~~~~~~~~~~~~~~~~
```
Comment 5 Diego Pino 2024-05-20 23:12:23 PDT
Re-opening for pull request https://github.com/webkit/webkit/pull/28830
Comment 6 EWS 2024-05-20 23:35:48 PDT
Committed 279038@main (d1b1d17c730c): <https://commits.webkit.org/279038@main>

Reviewed commits have been landed. Closing PR #28830 and removing active labels.