Commit 891fa6d
Add casts that will be needed once Latin1Character is a distinct type
rdar://161524685
https://bugs.webkit.org/show_bug.cgi?id=299706
Reviewed by Geoffrey Garen.
* Source/JavaScriptCore/API/JSScript.mm:
(+[JSScript scriptOfType:memoryMappedFromASCIIFile:withSourceURL:andBytecodeCache:inVirtualMachine:error:]):
Cast to Latin1Character.
* Source/JavaScriptCore/API/JSStringRefCF.cpp:
(JSStringCreateWithCFString): Cast to UInt8.
(JSStringCopyCFString): Ditto.
* Source/JavaScriptCore/inspector/remote/socket/RemoteInspectorSocket.cpp:
(Inspector::RemoteInspector::backendCommands const): Eliminate use of String::adopt.
It doesn't really work for vectors any more, and likely we should remove it to avoid
making a promise we can't keep. It doesn't work with byteCast, which is why we need
to do this here now.
* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewPrototype.cpp:
(JSC::uint8ArrayPrototypeToHex): Cast to uint8_t.
* Source/JavaScriptCore/runtime/LiteralParser.cpp:
(JSC::reviverMode>::Lexer::lexString): Reduce mixing char with Latin1Character a bit.
* Source/WTF/wtf/URLParser.cpp:
(WTF::URLParser::appendNumberToASCIIBuffer): Cast to char.
* Source/WTF/wtf/cf/CFURLExtras.cpp:
(WTF::bytesAsString): Cast to UInt8.
(WTF::isSameOrigin): Cast to Latin1Character.
* Source/WTF/wtf/cf/URLCF.cpp:
(WTF::URL::createCFURL): Cast to UInt8.
* Source/WTF/wtf/cocoa/NSURLExtras.mm:
(WTF::userVisibleString): Cast to Latin1Character.
* Source/WTF/wtf/persistence/PersistentCoders.cpp:
(WTF::Persistence::Coder<String>::encodeForPersistence): Use asBytes.
* Source/WTF/wtf/text/StringBuilder.h:
(WTF::StringBuilder::operator[] const): Cast so the conditional operator
does not mix types.
* Source/WTF/wtf/text/WTFString.cpp:
(WTF::String::String): Cast to Latin1Character.
(WTF::String::ascii const): Cast so the conditional operator does not mix types.
* Source/WTF/wtf/text/cf/StringCF.cpp:
(WTF::String::String): Cast to UInt8.
* Source/WTF/wtf/text/cf/StringImplCF.cpp:
(WTF::StringImpl::createCFString): Ditto.
* Source/WTF/wtf/text/cf/StringViewCF.cpp:
(WTF::StringView::createCFString const): Ditto.
(WTF::StringView::createCFStringWithoutCopying const): Ditto.
* Source/WebCore/Modules/encryptedmedia/InitDataRegistry.cpp:
(WebCore::extractKeyIDsKeyids): Cast to Latin1Character to pass to parseJSON and remove
the unnecessary copy into a temporary String.
* Source/WebCore/Modules/mediastream/PeerConnectionBackend.cpp:
(WebCore::PeerConnectionBackend::handleLogMessage): Cast to uint8_t.
* Source/WebCore/Modules/mediastream/RTCRtpSFrameTransformerCocoa.cpp:
(WebCore::RTCRtpSFrameTransformer::computeSaltKey): Ditto.
(WebCore::createBaseSFrameKey): Ditto.
(WebCore::RTCRtpSFrameTransformer::computeAuthenticationKey): Ditto.
(WebCore::RTCRtpSFrameTransformer::computeEncryptionKey): Ditto.
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerDtlsTransportBackend.cpp:
(WebCore::GStreamerDtlsTransportBackendObserver::stateChanged): Ditto.
* Source/WebCore/Modules/push-api/PushMessageCrypto.cpp:
(WebCore::PushCrypto::decryptAES128GCMPayload): Ditto.
(WebCore::PushCrypto::decryptAESGCMPayload): Ditto.
* Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:
(WebCore::trimInputSample): Cast to Latin1Character.
(WebCore::WebSocketHandshake::readStatusLine): Ditto.
* Source/WebCore/bindings/js/ScriptBufferSourceProvider.h: Cast to Latin1Character.
* Source/WebCore/bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneDeserializer::readString): Ditto.
* Source/WebCore/contentextensions/DFABytecodeInterpreter.cpp:
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpretJumpTable):
Cast so the conditional operator does not mix types.
(WebCore::ContentExtensions::DFABytecodeInterpreter::interpret): Ditto.
* Source/WebCore/crypto/SubtleCrypto.cpp:
(WebCore::SubtleCrypto::unwrapKey): Cast to Latin1Character to pass to JSONParse and remove
the unnecessary copy into a temporary String.
* Source/WebCore/editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::replaceRichContentWithAttachments): Cast to Latin1Character.
* Source/WebCore/fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::stringResult): Ditto.
* Source/WebCore/html/FTPDirectoryDocument.cpp:
(WebCore::FTPDirectoryDocumentParser::loadDocumentTemplate): Ditto.
* Source/WebCore/html/parser/HTMLEntityParser.cpp:
(WebCore::StringParsingBufferSource::currentCharacter const):
Cast so the conditional operator does not mix types.
* Source/WebCore/html/track/VTTScanner.h:
(WebCore::VTTScanner::currentChar const): Ditto.
* Source/WebCore/html/track/WebVTTParser.cpp:
(WebCore::WebVTTParser::fileFinished): Cast to uint8_t.
* Source/WebCore/loader/FTPDirectoryParser.cpp:
(WebCore::parseOneFTPLine): Cast to Latin1Character.
* Source/WebCore/loader/FormSubmission.cpp:
(WebCore::appendMailtoPostFormDataToURL): Cast to Latin1Character.
(WebCore::FormSubmission::create): Ditto.
* Source/WebCore/loader/TextResourceDecoder.cpp:
(WebCore::findXMLEncoding): Cast to uint8_t.
(WebCore::TextResourceDecoder::checkForCSSCharset): Cast to uint8_t and Latin1Character.
(WebCore::TextResourceDecoder::checkForHeadCharset): Ditto.
* Source/WebCore/loader/cache/CachedScript.cpp:
(WebCore::CachedScript::script): Cast to Latin1Character.
(WebCore::CachedScript::codeBlockHashConcurrently): Ditto.
* Source/WebCore/platform/encryptedmedia/CDMUtilities.cpp:
(WebCore::CDMUtilities::parseJSONObject): Cast to Latin1Character to pass to parseJSON
and remove the unnecessary copy into a temporary String.
* Source/WebCore/platform/graphics/avfoundation/CDMFairPlayStreaming.cpp:
(WebCore::extractSinfData): Ditto.
(WebCore::CDMPrivateFairPlayStreaming::extractKeyIDsMpts): Ditto.
* Source/WebCore/platform/graphics/avfoundation/objc/CDMInstanceFairPlayStreamingAVFObjC.mm:
(WebCore::parseJSONValue): Cast to Latin1Character.
* Source/WebCore/platform/graphics/freetype/FontCacheFreeType.cpp:
(WebCore::fontNameMapName): Ditto.
* Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp:
(WebCore::ParsedResponseMessage::ParsedResponseMessage): Cast to Latin1Character.
(WebCore::CDMInstanceSessionThunder::loadSession): Ditto.
* Source/WebCore/platform/gstreamer/GStreamerElementHarness.cpp:
(WebCore::MermaidBuilder::span const): Cast to uint8_t.
* Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::decodingWarning): Cast to char.
(WebCore::PNGImageDecoder::readChunks): Ditto.
* Source/WebCore/platform/mediarecorder/MediaRecorderPrivateMock.cpp:
(WebCore::MediaRecorderPrivateMock::fetchData): Cast to uint8_t.
* Source/WebCore/platform/network/curl/OpenSSLHelper.cpp:
(OpenSSL::BIO::getDataAsString const): Cast to Latin1Character.
(OpenSSL::toString): Ditto.
* Source/WebCore/platform/network/soup/CertificateInfoSoup.cpp:
(WebCore::CertificateInfo::summary const): Ditto.
* Source/WebCore/platform/text/SegmentedString.h:
(WebCore::SegmentedString::Substring::currentCharacter const):
Cast so the conditional operator does not mix types.
* Source/WebCore/testing/MockCDMFactory.cpp:
(WebCore::MockCDM::sanitizeResponse const): Cast to Latin1Character.
(WebCore::MockCDMInstance::setServerCertificate): Ditto.
(WebCore::MockCDMInstanceSession::updateLicense): Ditto.
* Source/WebGPU/WebGPU/Pipeline.mm:
(WebKit::printToFileForPsoRepro): Cast to uint8_t.
* Source/WebKit/NetworkProcess/cache/NetworkCache.cpp:
(WebKit::NetworkCache::Cache::dumpContentsToFile): Ditto.
* Source/WebKit/NetworkProcess/storage/CacheStorageManager.cpp:
(WebKit::readSizeFile): Cast to Latin1Character.
* Source/WebKit/Platform/IPC/DaemonCoders.h:
(WebKit::Daemon::Coder<WTF::String>::encode): Cast to uint8_t.
* Source/WebKit/Shared/API/c/cf/WKStringCF.mm:
(WKStringCopyCFString): Cast to UInt8.
* Source/WebKit/Shared/Cocoa/SandboxExtensionCocoa.mm:
(WebKit::SandboxExtensionImpl::SandboxExtensionImpl): Cast to Latin1Character.
* Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp:
(API::getContentRuleListSourceFromMappedFile): Cast to Latin1Character.
* Source/WebKit/UIProcess/API/C/WKPage.cpp:
(dataFrom): Cast to uint8_t.
* Source/WebKit/UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::testIPCSharedMemory): Cast to Latin1Character.
* Source/WebKit/UIProcess/Extensions/WebExtensionDeclarativeNetRequestSQLiteStore.cpp:
(WebKit::WebExtensionDeclarativeNetRequestSQLiteStore::getKeysAndValuesFromRowIterator):
Ditto.
* Source/WebKit/UIProcess/Inspector/glib/RemoteInspectorClient.cpp:
(WebKit::RemoteInspectorClient::setBackendCommands): Cast to std::byte.
* Source/WebKit/UIProcess/Inspector/mac/RemoteWebInspectorUIProxyMac.mm:
(WebKit::RemoteWebInspectorUIProxy::platformLoad): Cast to Latin1Character.
* Source/WebKit/UIProcess/Inspector/mac/WebInspectorUIProxyMac.mm:
(WebKit::WebInspectorUIProxy::platformLoad): Ditto.
* Source/WebKit/UIProcess/wpe/WebPasteboardProxyWPE.cpp:
(WebKit::WebPasteboardProxy::readURLFromPasteboard): Ditto.
* Source/WebKit/WebProcess/Network/webrtc/RTCDataChannelRemoteManager.cpp:
(WebKit::RTCDataChannelRemoteManager::sendData): Ditto.
* Source/WebKit/WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::registerLogClient): Cast to uint8_t.
* Tools/TestWebKitAPI/Tests/WTF/Base64.cpp:
(TestWebKitAPI::TEST(Base64, Encode)): Cast to uint8_t.
(TestWebKitAPI::TEST(Base64, EncodeOmitPadding)): Ditto.
(TestWebKitAPI::TEST(Base64, EncodeURL)): Ditto.
(TestWebKitAPI::TEST(Base64, EncodeURLOmitPadding)): Ditto.
* Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp:
(TestWebKitAPI::createTestFile): Ditto.
(TestWebKitAPI::TEST_F(FileSystemTest, openExistingFileTruncate)): Ditto.
(TestWebKitAPI::TEST_F(FileSystemTest, openExistingFileReadWrite)): Ditto.
(TestWebKitAPI::TEST_F(FileSystemTest, deleteEmptyDirectoryContainingDSStoreFile)): Ditto.
(TestWebKitAPI::TEST_F(FileSystemTest, deleteEmptyDirectoryOnNonEmptyDirectory)): Ditto.
(TestWebKitAPI::TEST_F(FileSystemTest, moveDirectory)): Ditto.
(TestWebKitAPI::runGetFileModificationTimeTest): Ditto.
(TestWebKitAPI::TEST_F(FileSystemTest, readEntireFile)): Ditto.
* Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp:
(TestWebKitAPI::TEST(WTF, ExternalStringImplCreate8bit)): Use char and cast to Latin1Character.
(TestWebKitAPI::TEST(WTF, ExternalStringAtom)): Ditto.
* Tools/TestWebKitAPI/Tests/WTF/StringView.cpp:
(TestWebKitAPI::TEST(WTF, StringViewEqualIgnoringASCIICaseWithLatin1Characters)):
Use byteCast instead of reinterpret_cast.
* Tools/TestWebKitAPI/Tests/WTF/cocoa/URLExtras.mm:
(TestWebKitAPI::dataAsString): Pass a character instead of an int.
* Tools/TestWebKitAPI/Tests/WebCore/PushMessageCrypto.cpp:
(TestWebKitAPI::mustBase64URLDecode): Use ASCIILiteral.
(TestWebKitAPI::stringView): Added.
(TestWebKitAPI::TEST(PushMessageCrypto, AES128GCMPayloadWithMinimalPadding)): Use stringView.
(TestWebKitAPI::TEST(PushMessageCrypto, AES128GCMPayloadWithPadding)): Ditto.
(TestWebKitAPI::TEST(PushMessageCrypto, AESGCMPayloadWithMinimalPadding)): Ditto.
(TestWebKitAPI::TEST(PushMessageCrypto, AESGCMPayloadWithPadding)): Ditto.
* Tools/TestWebKitAPI/Tests/WebCore/SharedBuffer.cpp:
(TestWebKitAPI::TEST_F(FragmentedSharedBufferTest, createWithContentsOfExistingFile)):
Cast to Latin1Character.
(TestWebKitAPI::TEST_F(FragmentedSharedBufferTest, read)): Ditto.
(TestWebKitAPI::TEST_F(SharedBufferChunkReaderTest, includeSeparator)): Use uint8_t.
(TestWebKitAPI::TEST_F(SharedBufferChunkReaderTest, peekData)): Cast to Latin1Character.
* Tools/TestWebKitAPI/Tests/WebCore/SharedBufferTest.cpp:
(TestWebKitAPI::FragmentedSharedBufferTest::SetUp): Cast to uint8_t.
* Tools/TestWebKitAPI/Tests/WebCore/curl/CurlMultipartHandleTests.cpp:
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, SimpleMessage)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, NoHeader)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, NoBody)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, TransportPadding)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, NoEndOfBoundary)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, NoEndOfBoundaryAfterCompleted)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, NoCloseDelimiter)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, NoCloseDelimiterAfterCompleted)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, CloseDelimiter)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, CloseDelimiterAfterCompleted)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, DivideFirstDelimiter)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, DivideSecondDelimiter)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, DivideLastDelimiter)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, DivideCloseDelimiter)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, DivideTransportPadding)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, DivideHeader)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, DivideBody)): Ditto.
(TestWebKitAPI::Curl::TEST(CurlMultipartHandleTests, CompleteWhileHeaderProcessing)): Ditto.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm:
(-[IndexedDBOpenPanelUIDelegate webView:runOpenPanelWithParameters:initiatedByFrame:completionHandler:]): Ditto.
* Tools/TestWebKitAPI/Tests/WebKitCocoa/WebPushDaemon.mm:
(TestWebKitAPI::WebPushDTestWebView::injectPushMessage): Cast to Latin1Character.
Canonical link: https://commits.webkit.org/301031@main
Signed-off-by: Xabier Rodriguez Calvar <calvaris@igalia.com>1 parent 80604fc commit 891fa6d
61 files changed
Lines changed: 190 additions & 194 deletions
File tree
- Source
- JavaScriptCore
- API
- inspector/remote/socket
- runtime
- WTF/wtf
- cf
- cocoa
- persistence
- text
- cf
- WebCore
- Modules
- encryptedmedia
- mediastream
- gstreamer
- push-api
- websockets
- bindings/js
- contentextensions
- crypto
- editing/cocoa
- fileapi
- html
- parser
- track
- loader
- cache
- platform
- encryptedmedia
- graphics
- avfoundation
- objc
- freetype
- gstreamer/eme
- gstreamer
- mediarecorder
- network/curl
- text
- testing
- WebKit
- NetworkProcess
- cache
- storage
- Platform/IPC
- UIProcess
- API
- C
- Cocoa
- Inspector
- glib
- mac
- WebProcess/Network/webrtc
- Tools/TestWebKitAPI/Tests
- WTF
- WebCore
- curl
- WebKitCocoa
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| |||
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
67 | | - | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
| 265 | + | |
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| |||
Lines changed: 2 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
233 | 233 | | |
234 | 234 | | |
235 | 235 | | |
236 | | - | |
237 | 236 | | |
238 | 237 | | |
239 | 238 | | |
| |||
259 | 258 | | |
260 | 259 | | |
261 | 260 | | |
262 | | - | |
263 | | - | |
| 261 | + | |
264 | 262 | | |
265 | 263 | | |
266 | | - | |
| 264 | + | |
267 | 265 | | |
268 | 266 | | |
269 | 267 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
911 | 911 | | |
912 | 912 | | |
913 | 913 | | |
914 | | - | |
| 914 | + | |
915 | 915 | | |
916 | 916 | | |
917 | 917 | | |
| |||
926 | 926 | | |
927 | 927 | | |
928 | 928 | | |
929 | | - | |
930 | | - | |
| 929 | + | |
| 930 | + | |
931 | 931 | | |
932 | 932 | | |
933 | 933 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
90 | 90 | | |
91 | 91 | | |
92 | 92 | | |
93 | | - | |
| 93 | + | |
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
317 | 317 | | |
318 | 318 | | |
319 | 319 | | |
320 | | - | |
| 320 | + | |
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
103 | | - | |
| 103 | + | |
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
278 | 278 | | |
279 | 279 | | |
280 | 280 | | |
281 | | - | |
282 | | - | |
| 281 | + | |
283 | 282 | | |
284 | 283 | | |
285 | 284 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | | - | |
| 56 | + | |
56 | 57 | | |
57 | 58 | | |
58 | 59 | | |
| |||
392 | 393 | | |
393 | 394 | | |
394 | 395 | | |
395 | | - | |
| 396 | + | |
396 | 397 | | |
397 | | - | |
| 398 | + | |
398 | 399 | | |
399 | 400 | | |
400 | 401 | | |
| |||
0 commit comments