Skip to content

Commit

Permalink
Reduce use of const char* in string concatenations
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=274063

Reviewed by Tim Nguyen.

* Source/WebCore/Modules/airplay/WebMediaSessionManager.cpp:
(WebCore::WebMediaSessionLogger::logAlways const):
* Source/WebCore/Modules/applepay/ApplePayRequestBase.cpp:
(WebCore::convertAndValidate):
* Source/WebCore/Modules/applepay/ApplePaySession.cpp:
(WebCore::convertAndValidateTotal):
(WebCore::convertAndValidate):
* Source/WebCore/Modules/applepay/PaymentRequestValidator.mm:
(WebCore::validateCountryCode):
(WebCore::validateCurrencyCode):
* Source/WebCore/Modules/applepay/paymentrequest/ApplePayPaymentHandler.cpp:
(WebCore::validate):
* Source/WebCore/Modules/cache/DOMCacheEngine.cpp:
(WebCore::DOMCacheEngine::convertToExceptionAndLog):
* Source/WebCore/Modules/cache/DOMCacheStorage.cpp:
(WebCore::logConsolePersistencyError):
* Source/WebCore/Modules/cookie-store/CookieStore.cpp:
(WebCore::CookieStore::set):
* Source/WebCore/Modules/encryptedmedia/MediaKeySystemController.cpp:
(WebCore::MediaKeySystemController::logRequestMediaKeySystemDenial):
* Source/WebCore/Modules/fetch/FetchBody.cpp:
(WebCore::FetchBody::extract):
* Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp:
(WebCore::FetchBodyConsumer::packageFormData):
* Source/WebCore/Modules/fetch/FetchHeaders.cpp:
(WebCore::canWriteHeader):
(WebCore::appendSetCookie):
(WebCore::FetchHeaders::remove):
(WebCore::FetchHeaders::get const):
(WebCore::FetchHeaders::has const):
* Source/WebCore/Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::setBody):
* Source/WebCore/Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::redirect):
* Source/WebCore/Modules/indexeddb/IDBIndex.cpp:
(WebCore::IDBIndex::setName):
* Source/WebCore/Modules/indexeddb/IDBKeyData.cpp:
(WebCore::IDBKeyData::loggingString const):
* Source/WebCore/Modules/indexeddb/IDBKeyPath.cpp:
(WebCore::loggingString):
* Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp:
(WebCore::IDBObjectStore::setName):
* Source/WebCore/Modules/indexeddb/server/SQLiteIDBBackingStore.cpp:
(WebCore::IDBServer::v1RecordsTableSchema):
(WebCore::IDBServer::v2RecordsTableSchema):
(WebCore::IDBServer::v1IndexRecordsTableSchema):
(WebCore::IDBServer::v2IndexRecordsTableSchema):
(WebCore::IDBServer::createV1ObjectStoreInfoSchema):
(WebCore::IDBServer::createV2ObjectStoreInfoSchema):
(WebCore::IDBServer::createOrMigrateRecordsTableIfNecessary):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidBlobTables):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidRecordsTable):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsTable):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsIndex):
(WebCore::IDBServer::SQLiteIDBBackingStore::ensureValidIndexRecordsRecordIndex):
* Source/WebCore/Modules/indexeddb/server/SQLiteIDBCursor.cpp:
(WebCore::IDBServer::buildPreIndexStatement):
(WebCore::IDBServer::buildIndexStatement):
(WebCore::IDBServer::buildObjectStoreStatement):
* Source/WebCore/Modules/indexeddb/shared/IDBCursorInfo.cpp:
(WebCore::IDBCursorInfo::loggingString const):
* Source/WebCore/Modules/indexeddb/shared/IDBGetAllRecordsData.cpp:
(WebCore::IDBGetAllRecordsData::loggingString const):
* Source/WebCore/Modules/indexeddb/shared/IDBGetRecordData.cpp:
(WebCore::IDBGetRecordData::loggingString const):
* Source/WebCore/Modules/indexeddb/shared/IDBIndexInfo.cpp:
(WebCore::IDBIndexInfo::loggingString const):
(WebCore::IDBIndexInfo::condensedLoggingString const):
* Source/WebCore/Modules/indexeddb/shared/IDBIterateCursorData.cpp:
(WebCore::IDBIterateCursorData::loggingString const):
* Source/WebCore/Modules/indexeddb/shared/IDBObjectStoreInfo.cpp:
(WebCore::IDBObjectStoreInfo::condensedLoggingString const):
* Source/WebCore/Modules/indexeddb/shared/IDBResourceIdentifier.cpp:
(WebCore::IDBResourceIdentifier::loggingString const):
* Source/WebCore/Modules/indexeddb/shared/IDBTransactionInfo.cpp:
(WebCore::IDBTransactionInfo::loggingString const):
* Source/WebCore/Modules/mediasession/MediaSessionCoordinator.cpp:
(WebCore::MediaSessionCoordinator::join):
(WebCore::MediaSessionCoordinator::leave):
(WebCore::MediaSessionCoordinator::seekTo):
(WebCore::MediaSessionCoordinator::play):
(WebCore::MediaSessionCoordinator::pause):
(WebCore::MediaSessionCoordinator::setTrack):
* Source/WebCore/Modules/mediasource/MediaSource.cpp:
(WebCore::MediaSource::failedToCreateRenderer):
* Source/WebCore/Modules/mediastream/RTCDataChannel.cpp:
(WebCore::RTCDataChannel::createMessageQueue):
* Source/WebCore/Modules/mediastream/UserMediaController.cpp:
(WebCore::UserMediaController::logGetUserMediaDenial):
(WebCore::UserMediaController::logGetDisplayMediaDenial):
(WebCore::UserMediaController::logEnumerateDevicesDenial):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerDataChannelHandler.cpp:
(WebCore::GStreamerDataChannelHandler::GStreamerDataChannelHandler):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerMediaEndpoint.cpp:
(WebCore::GStreamerMediaEndpoint::initializePipeline):
* Source/WebCore/Modules/mediastream/gstreamer/GStreamerWebRTCUtils.cpp:
(WebCore::capsFromRtpCapabilities):
* Source/WebCore/Modules/notifications/NotificationJSONParser.cpp:
(WebCore::NotificationJSONParser::parseNotificationOptions):
* Source/WebCore/Modules/paymentrequest/PaymentRequest.cpp:
(WebCore::checkAndCanonicalizeAmount):
* Source/WebCore/Modules/push-api/PushDatabase.cpp:
(WebCore::openAndMigrateDatabaseImpl):
* Source/WebCore/Modules/web-locks/WebLockManager.cpp:
(WebCore::WebLockManager::request):
* Source/WebCore/Modules/webaudio/AudioWorkletGlobalScope.cpp:
(WebCore::AudioWorkletGlobalScope::registerProcessor):
* Source/WebCore/Modules/webaudio/DelayNode.cpp:
(WebCore::DelayNode::create):
* Source/WebCore/Modules/webaudio/OfflineAudioContext.cpp:
(WebCore::OfflineAudioContext::OfflineAudioContext):
* Source/WebCore/Modules/webcodecs/WebCodecsAudioEncoder.cpp:
(WebCore::WebCodecsAudioEncoder::encode):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoEncoder.cpp:
(WebCore::WebCodecsVideoEncoder::encode):
* Source/WebCore/Modules/webcodecs/WebCodecsVideoFrame.cpp:
(WebCore::WebCodecsVideoFrame::create):
* Source/WebCore/Modules/webdatabase/ChangeVersionWrapper.cpp:
(WebCore::ChangeVersionWrapper::performPreflight):
(WebCore::ChangeVersionWrapper::performPostflight):
* Source/WebCore/Modules/webdatabase/Database.cpp:
(WebCore::Database::getVersionFromDatabase):
(WebCore::Database::setVersionInDatabase):
* Source/WebCore/Modules/webdatabase/SQLError.h:
(WebCore::SQLError::create):
* Source/WebCore/Modules/webdatabase/SQLStatement.cpp:
(WebCore::SQLStatement::execute):
* Source/WebCore/Modules/webdatabase/SQLTransaction.cpp:
(WebCore::SQLTransaction::openTransactionAndPreflight):
(WebCore::SQLTransaction::postflightAndCommit):
* Source/WebCore/Modules/websockets/ThreadableWebSocketChannel.cpp:
(WebCore::ThreadableWebSocketChannel::create):
* Source/WebCore/Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::connect):
* Source/WebCore/Modules/websockets/WebSocketExtensionDispatcher.cpp:
(WebCore::WebSocketExtensionDispatcher::appendAcceptedExtension):
(WebCore::WebSocketExtensionDispatcher::processHeaderValue):
* Source/WebCore/Modules/websockets/WebSocketExtensionProcessor.h:
(WebCore::WebSocketExtensionProcessor::failureReason):
* Source/WebCore/Modules/websockets/WebSocketFrame.cpp:
(WebCore::WebSocketFrame::parseFrame):
* Source/WebCore/Modules/websockets/WebSocketHandshake.cpp:
(WebCore::resourceName):
(WebCore::WebSocketHandshake::clientLocation const):
(WebCore::WebSocketHandshake::clientHandshakeMessage const):
(WebCore::WebSocketHandshake::readServerHandshake):
(WebCore::WebSocketHandshake::readStatusLine):
(WebCore::WebSocketHandshake::readHTTPHeaders):
* Source/WebCore/Modules/websockets/WorkerThreadableWebSocketChannel.cpp:
(WebCore::WorkerThreadableWebSocketChannel::Bridge::connect):
* Source/WebCore/accessibility/AXCoreObject.cpp:
(WebCore::AXCoreObject::value):
* Source/WebCore/accessibility/AXLogger.cpp:
(WebCore::AXLogger::log):
* Source/WebCore/accessibility/AXObjectCache.cpp:
(WebCore::AXObjectCache::AXObjectCache):
(WebCore::AXObjectCache::remove):
(WebCore::AXObjectCache::handleRoleChanged):
(WebCore::AXObjectCache::deferAttributeChangeIfNeeded):
(WebCore::AXObjectCache::handleAttributeChange):
(WebCore::AXObjectCache::performDeferredCacheUpdate):
(WebCore::AXObjectCache::addRelation):
(WebCore::AXObjectCache::removeAllRelations):
(WebCore::AXObjectCache::removeRelation):
(WebCore::AXObjectCache::removeRelationByID):
* Source/WebCore/accessibility/AXObjectCache.h:
(WebCore::CharacterOffset::debugDescription):
* Source/WebCore/accessibility/AXTextMarker.cpp:
(WebCore::AXTextMarker::debugDescription const):
(WebCore::AXTextMarkerRange::debugDescription const):
* Source/WebCore/accessibility/AccessibilityObject.cpp:
(WebCore::AccessibilityObject::dbg const):
(WebCore::AccessibilityObject::insertText):
* Source/WebCore/accessibility/AccessibilityProgressIndicator.cpp:
(WebCore::AccessibilityProgressIndicator::valueDescription const):
* Source/WebCore/accessibility/atspi/AccessibilityAtspi.cpp:
(WebCore::AccessibilityAtspi::registerRoot):
(WebCore::AccessibilityAtspi::registerObject):
(WebCore::AccessibilityAtspi::registerHyperlink):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedObject.cpp:
(WebCore::AXIsolatedObject::insertText):
* Source/WebCore/accessibility/isolatedtree/AXIsolatedTree.cpp:
(WebCore::AXIsolatedTree::addUnconnectedNode):
(WebCore::AXIsolatedTree::updateNodeProperties):
(WebCore::AXIsolatedTree::updateChildren):
(WebCore::AXIsolatedTree::setFocusedNodeID):
(WebCore::AXIsolatedTree::updateLoadingProgress):
(WebCore::AXIsolatedTree::removeNode):
(WebCore::AXIsolatedTree::removeSubtreeFromNodeMap):
(WebCore::AXIsolatedTree::applyPendingChanges):
* Source/WebCore/accessibility/mac/WebAccessibilityObjectWrapperMac.mm:
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:]):
(-[WebAccessibilityObjectWrapper accessibilityPerformShowMenuAction]):
(-[WebAccessibilityObjectWrapper _accessibilityShowContextMenu]):
(-[WebAccessibilityObjectWrapper _accessibilitySetValue:forAttribute:]):
(formatForDebugger):
(-[WebAccessibilityObjectWrapper accessibilityAttributeValue:forParameter:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeCount:]):
(-[WebAccessibilityObjectWrapper accessibilityArrayAttributeValues:index:maxCount:]):
* Source/WebCore/bindings/js/JSCallbackData.cpp:
(WebCore::JSCallbackData::invokeCallback):
* Source/WebCore/bindings/js/JSDOMBindingSecurity.cpp:
(WebCore::remoteFrameAccessError):
* Source/WebCore/bindings/js/JSDOMConvertNumbers.cpp:
(WebCore::rangeErrorString):
* Source/WebCore/bindings/js/JSDOMExceptionHandling.cpp:
(WebCore::throwAttributeTypeError):
(WebCore::throwRequiredMemberTypeError):
(WebCore::throwConstructorScriptExecutionContextUnavailableError):
(WebCore::makeThisTypeErrorMessage):
(WebCore::makeUnsupportedIndexedSetterErrorMessage):
* Source/WebCore/bindings/js/ScriptModuleLoader.cpp:
(WebCore::ScriptModuleLoader::notifyFinished):
* Source/WebCore/contentextensions/ContentExtensionsBackend.cpp:
(WebCore::ContentExtensions::ContentExtensionsBackend::processContentRuleListsForLoad):
* Source/WebCore/css/CSSCanvasValue.cpp:
(WebCore::CSSCanvasValue::customCSSText const):
* Source/WebCore/css/CSSFilterImageValue.cpp:
(WebCore::CSSFilterImageValue::customCSSText const):
* Source/WebCore/css/CSSFontFaceRule.cpp:
(WebCore::CSSFontFaceRule::cssTextInternal const):
* Source/WebCore/css/CSSFontFaceSrcValue.cpp:
(WebCore::CSSFontFaceSrcLocalValue::customCSSText const):
* Source/WebCore/css/CSSFontStyleWithAngleValue.cpp:
(WebCore::CSSFontStyleWithAngleValue::customCSSText const):
* Source/WebCore/css/CSSNamedImageValue.cpp:
(WebCore::CSSNamedImageValue::customCSSText const):
* Source/WebCore/css/CSSPageRule.cpp:
(WebCore::CSSPageRule::selectorText const):
* Source/WebCore/css/CSSPaintImageValue.cpp:
(WebCore::CSSPaintImageValue::customCSSText const):
* Source/WebCore/css/CSSTimingFunctionValue.cpp:
(WebCore::CSSCubicBezierTimingFunctionValue::customCSSText const):
(WebCore::CSSSpringTimingFunctionValue::customCSSText const):
* Source/WebCore/css/CSSUnicodeRangeValue.cpp:
(WebCore::CSSUnicodeRangeValue::customCSSText const):
* Source/WebCore/css/DOMMatrixReadOnly.cpp:
(WebCore::DOMMatrixReadOnly::toString const):
* Source/WebCore/css/ShorthandSerializer.cpp:
(WebCore::ShorthandSerializer::serializeGrid const):
* Source/WebCore/css/StyleSheetContents.cpp:
(WebCore::StyleSheetContents::parseAuthorStyleSheet):
* Source/WebCore/css/typedom/CSSUnparsedValue.cpp:
(WebCore::CSSUnparsedValue::setItem):
* Source/WebCore/css/typedom/MainThreadStylePropertyMapReadOnly.cpp:
(WebCore::MainThreadStylePropertyMapReadOnly::get const):
(WebCore::MainThreadStylePropertyMapReadOnly::getAll const):
* Source/WebCore/css/typedom/StylePropertyMap.cpp:
(WebCore::StylePropertyMap::set):
(WebCore::StylePropertyMap::append):
(WebCore::StylePropertyMap::remove):
* Source/WebCore/css/typedom/numeric/CSSNumericType.cpp:
(WebCore::CSSNumericType::debugString const):
* Source/WebCore/css/typedom/transform/CSSTransformValue.cpp:
(WebCore::CSSTransformValue::setItem):
* Source/WebCore/dom/DeviceMotionEvent.cpp:
(WebCore::DeviceMotionEvent::requestPermission):
* Source/WebCore/dom/DeviceOrientationEvent.cpp:
(WebCore::DeviceOrientationEvent::requestPermission):
* Source/WebCore/dom/Document.cpp:
(WebCore::printNavigationErrorMessage):
(WebCore::Document::createElementForBindings):
(WebCore::Document::createProcessingInstruction):
(WebCore::Document::processMetaHttpEquiv):
(WebCore::Document::parseQualifiedName):
(WebCore::Document::createAttribute):
(WebCore::Document::initSecurityContext):
(WebCore::Document::applyQuickLookSandbox):
* Source/WebCore/dom/DocumentMarker.h:
(WebCore::DocumentMarker::description const):
* Source/WebCore/dom/Element.cpp:
(WebCore::Element::toggleAttribute):
(WebCore::Element::setAttribute):
* Source/WebCore/dom/LoadableClassicScript.cpp:
(WebCore::LoadableNonModuleScriptBase::notifyFinished):
* Source/WebCore/dom/Position.cpp:
(WebCore::Position::debugDescription const):
* Source/WebCore/dom/Range.cpp:
(WebCore::Range::debugDescription const):
* Source/WebCore/dom/TrustedType.cpp:
(WebCore::trustedTypeCompliantString):
(WebCore::requireTrustedTypesForPreNavigationCheckPasses):
* Source/WebCore/dom/messageports/MessagePortChannel.h:
(WebCore::MessagePortChannel::logString const):
* Source/WebCore/editing/HTMLInterchange.cpp:
(WebCore::convertHTMLTextToInterchangeFormat):
* Source/WebCore/editing/VisiblePosition.cpp:
(WebCore::VisiblePositionRange::debugDescription const):
* Source/WebCore/editing/VisibleSelection.cpp:
(WebCore::VisibleSelection::debugDescription const):
* Source/WebCore/editing/cocoa/HTMLConverter.mm:
(HTMLConverter::_processElement):
* Source/WebCore/editing/markup.cpp:
(WebCore::serializePreservingVisualAppearanceInternal):
* Source/WebCore/fileapi/FileReaderLoader.cpp:
(WebCore::FileReaderLoader::convertToDataURL):
* Source/WebCore/history/HistoryItem.cpp:
(WebCore::HistoryItem::logString const):
* Source/WebCore/html/BaseTextInputType.cpp:
(WebCore::BaseTextInputType::patternMismatch const):
* Source/WebCore/html/CanvasBase.cpp:
(WebCore::CanvasBase::allocateImageBuffer const):
* Source/WebCore/html/DOMURL.cpp:
(WebCore::DOMURL::create):
* Source/WebCore/html/FTPDirectoryDocument.cpp:
(WebCore::processFileDateString):
* Source/WebCore/html/FileInputType.cpp:
(WebCore::FileInputType::firstElementPathForInputValue const):
* Source/WebCore/html/HTMLAnchorElement.cpp:
(WebCore::HTMLAnchorElement::parsePrivateClickMeasurement const):
* Source/WebCore/html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::setCSSStyleSheet):
* Source/WebCore/html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::ensureIsolatedWorld):
* Source/WebCore/html/HTMLSelectElement.cpp:
(WebCore::HTMLSelectElement::setItem):
(WebCore::HTMLSelectElement::setLength):
* Source/WebCore/html/ImageDocument.cpp:
(WebCore::ImageDocument::imageUpdated):
* Source/WebCore/html/PermissionsPolicy.cpp:
(WebCore::isPermissionsPolicyAllowedByDocumentAndAllOwners):
* Source/WebCore/html/ValidatedFormListedElement.cpp:
(WebCore::ValidatedFormListedElement::reportNonFocusableControlError):
* Source/WebCore/html/canvas/CanvasPath.cpp:
(WebCore::CanvasPath::roundRect):
* Source/WebCore/html/canvas/CanvasRenderingContext2DBase.cpp:
(WebCore::CanvasRenderingContext2DBase::getImageData const):
* Source/WebCore/html/canvas/WebGLRenderingContextBase.cpp:
(WebCore::WebGLRenderingContextBase::synthesizeGLError):
(WebCore::WebGLRenderingContextBase::synthesizeLostContextGLError):
* Source/WebCore/html/track/TextTrackCue.cpp:
(WebCore::invalidNodeException):
* Source/WebCore/html/track/TrackBase.cpp:
(WebCore::TrackBase::setLanguage):
* Source/WebCore/inspector/InspectorFrontendAPIDispatcher.cpp:
(WebCore::InspectorFrontendAPIDispatcher::dispatchMessageAsync):
* Source/WebCore/inspector/agents/InspectorAnimationAgent.cpp:
(WebCore::InspectorAnimationAgent::bindAnimation):
* Source/WebCore/inspector/agents/InspectorCSSAgent.cpp:
(WebCore::InspectorCSSAgent::forcePseudoState):
* Source/WebCore/inspector/agents/InspectorDOMAgent.cpp:
(WebCore::computeContentSecurityPolicySHA256Hash):
* Source/WebCore/inspector/agents/InspectorIndexedDBAgent.cpp:
* Source/WebCore/inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::interceptRequestWithError):
* Source/WebCore/inspector/agents/InspectorTimelineAgent.cpp:
(WebCore::InspectorTimelineAgent::setInstruments):
(WebCore::InspectorTimelineAgent::startFromConsole):
* Source/WebCore/inspector/agents/WebConsoleAgent.cpp:
(WebCore::WebConsoleAgent::didReceiveResponse):
(WebCore::WebConsoleAgent::didFailLoading):
* Source/WebCore/loader/CrossOriginAccessControl.cpp:
(WebCore::validateCrossOriginRedirectionURL):
(WebCore::passesAccessControlCheck):
(WebCore::validatePreflightResponse):
(WebCore::validateCrossOriginResourcePolicy):
* Source/WebCore/loader/CrossOriginEmbedderPolicy.cpp:
(WebCore::CrossOriginEmbedderPolicy::addPolicyHeadersTo const):
* Source/WebCore/loader/CrossOriginPreflightChecker.cpp:
(WebCore::CrossOriginPreflightChecker::doPreflight):
* Source/WebCore/loader/CrossOriginPreflightResultCache.cpp:
(WebCore::CrossOriginPreflightResultCacheItem::create):
(WebCore::CrossOriginPreflightResultCacheItem::validateMethodAndHeaders const):
* Source/WebCore/loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::willSendRequest):
(WebCore::DocumentLoader::disallowDataRequest const):
* Source/WebCore/loader/FrameLoader.cpp:
(WebCore::FrameLoader::reportBlockedLoadFailed):
* Source/WebCore/loader/ImageLoader.cpp:
(WebCore::ImageLoader::notifyFinished):
* Source/WebCore/loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::checkFormForMixedContent):
* Source/WebCore/loader/PrivateClickMeasurement.cpp:
(WebCore::makeValidURL):
* Source/WebCore/loader/ResourceLoader.cpp:
(WebCore::ResourceLoader::didBlockAuthenticationChallenge):
(WebCore::ResourceLoader::didReceiveResponse):
* Source/WebCore/loader/SubresourceLoader.cpp:
(WebCore::SubresourceLoader::willSendRequestInternal):
* Source/WebCore/loader/WorkerThreadableLoader.cpp:
(WebCore::WorkerThreadableLoader::loadResourceSynchronously):
* Source/WebCore/loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::didFailLoadingEntry):
(WebCore::ApplicationCacheGroup::didFailLoadingManifest):
* Source/WebCore/loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::verifySchemaVersion):
* Source/WebCore/loader/archive/cf/LegacyWebArchive.cpp:
(WebCore::LegacyWebArchive::create):
* Source/WebCore/loader/archive/mhtml/MHTMLArchive.cpp:
(WebCore::MHTMLArchive::generateMHTMLData):
* Source/WebCore/loader/cache/CachedFontLoadRequest.h:
* Source/WebCore/loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::printAccessDeniedMessage const):
* Source/WebCore/loader/cocoa/PrivateClickMeasurementCocoa.mm:
(WebCore::PrivateClickMeasurement::calculateAndUpdateUnlinkableToken):
(WebCore::PrivateClickMeasurement::calculateAndUpdateSecretToken):
* Source/WebCore/page/ClientOrigin.h:
(WebCore::ClientOrigin::loggingString const):
* Source/WebCore/page/EventSource.cpp:
(WebCore::EventSource::responseIsValid const):
* Source/WebCore/page/History.cpp:
(WebCore::History::stateObjectAdded):
* Source/WebCore/page/LocalDOMWindow.cpp:
(WebCore::LocalDOMWindow::processPostMessage):
(WebCore::LocalDOMWindow::startListeningForDeviceOrientationIfNecessary):
(WebCore::LocalDOMWindow::startListeningForDeviceMotionIfNecessary):
(WebCore::LocalDOMWindow::crossDomainAccessErrorMessage):
* Source/WebCore/page/LocalFrameView.cpp:
(WebCore::LocalFrameView::debugDescription const):
* Source/WebCore/page/LoggedInStatus.cpp:
(WebCore::LoggedInStatus::create):
* Source/WebCore/page/MemoryRelease.cpp:
(WebCore::logMemoryStatistics):
* Source/WebCore/page/PageSerializer.cpp:
(WebCore::PageSerializer::urlForBlankFrame):
* Source/WebCore/page/PerformanceUserTiming.cpp:
(WebCore::PerformanceUserTiming::convertMarkToTimestamp const):
* Source/WebCore/page/PrintContext.cpp:
(WebCore::PrintContext::pageProperty):
* Source/WebCore/page/Quirks.cpp:
(WebCore::Quirks::requestStorageAccessAndHandleClick const):
* Source/WebCore/page/cocoa/ResourceUsageOverlayCocoa.mm:
(WebCore::ResourceUsageOverlay::platformDraw):
* Source/WebCore/page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportUnsupportedDirective const):
(WebCore::ContentSecurityPolicy::reportDuplicateDirective const):
(WebCore::ContentSecurityPolicy::reportInvalidPluginTypes const):
(WebCore::ContentSecurityPolicy::reportInvalidTrustedTypesPolicy const):
(WebCore::ContentSecurityPolicy::reportInvalidTrustedTypesSinkGroup const):
(WebCore::ContentSecurityPolicy::reportInvalidDirectiveValueCharacter const):
(WebCore::ContentSecurityPolicy::reportInvalidSourceExpression const):
* Source/WebCore/page/csp/ContentSecurityPolicyDirectiveList.cpp:
(WebCore::ContentSecurityPolicyDirectiveList::create):
* Source/WebCore/page/linux/ResourceUsageThreadLinux.cpp:
(WebCore::threadCPUUsage):
* Source/WebCore/platform/ScrollView.cpp:
(WebCore::ScrollView::debugDescription const):
* Source/WebCore/platform/animation/TimingFunction.cpp:
(WebCore::TimingFunction::createFromCSSText):
(WebCore::TimingFunction::cssText const):
* Source/WebCore/platform/audio/HRTFElevation.cpp:
(WebCore::HRTFElevation::calculateKernelsForAzimuthElevation):
* Source/WebCore/platform/audio/glib/MediaSessionGLib.cpp:
(WebCore::MediaSessionGLib::ensureMprisSessionRegistered):
* Source/WebCore/platform/audio/gstreamer/AudioDestinationGStreamer.cpp:
(WebCore::AudioDestinationGStreamer::AudioDestinationGStreamer):
* Source/WebCore/platform/audio/gstreamer/AudioEncoderGStreamer.cpp:
(WebCore::GStreamerAudioEncoder::create):
* Source/WebCore/platform/audio/gstreamer/AudioFileReaderGStreamer.cpp:
(WebCore::AudioFileReader::decodeAudioForBusCreation):
* Source/WebCore/platform/cocoa/KeyEventCocoa.mm:
(WebCore::keyIdentifierForCharCode):
* Source/WebCore/platform/encryptedmedia/CDMProxy.cpp:
(WebCore::KeyHandle::idAsString const):
* Source/WebCore/platform/graphics/ColorSerialization.cpp:
(WebCore::serializationUsingColorFunction):
* Source/WebCore/platform/graphics/GraphicsLayer.cpp:
(WebCore::GraphicsLayer::animationNameForTransition):
* Source/WebCore/platform/graphics/HEVCUtilities.cpp:
(WebCore::createAVCCodecParametersString):
* Source/WebCore/platform/graphics/ImageBuffer.cpp:
(WebCore::ImageBuffer::toDataURL):
* Source/WebCore/platform/graphics/MediaResourceSniffer.cpp:
(WebCore::MediaResourceSniffer::create):
* Source/WebCore/platform/graphics/SourceBufferPrivateClient.h:
(WTF::LogArgument<WebCore::SourceBufferEvictionData>::toString):
* Source/WebCore/platform/graphics/avfoundation/objc/SourceBufferParserAVFObjC.mm:
(WebCore::SourceBufferParserAVFObjC::isContentTypeSupported):
* Source/WebCore/platform/graphics/avfoundation/objc/WebCoreAVFResourceLoader.mm:
(WebCore::WebCoreAVFResourceLoader::startLoading):
* Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::debugName const):
(WebCore::GraphicsLayerCA::setContentsToSolidColor):
(WebCore::GraphicsLayerCA::setContentsToModel):
(WebCore::GraphicsLayerCA::recursiveCommitChanges):
(WebCore::GraphicsLayerCA::updateContentsImage):
(WebCore::GraphicsLayerCA::updateContentsRects):
(WebCore::GraphicsLayerCA::findOrMakeClone):
* Source/WebCore/platform/graphics/ca/TileController.cpp:
(WebCore::TileController::createTileLayer):
* Source/WebCore/platform/graphics/ca/cocoa/PlatformCAFiltersCocoa.mm:
(WebCore::PlatformCAFilters::presentationModifiers):
(WebCore::PlatformCAFilters::setFiltersOnLayer):
* Source/WebCore/platform/graphics/cg/ImageBufferUtilitiesCG.cpp:
(WebCore::encodeToDataURL):
* Source/WebCore/platform/graphics/gstreamer/ImageDecoderGStreamer.cpp:
(WebCore::ImageDecoderGStreamer::ImageDecoderGStreamer):
* Source/WebCore/platform/graphics/gstreamer/MediaPlayerPrivateGStreamer.cpp:
(WebCore::MediaPlayerPrivateGStreamer::load):
* Source/WebCore/platform/graphics/gstreamer/mse/AppendPipeline.cpp:
(WebCore::AppendPipeline::AppendPipeline):
(WebCore::AppendPipeline::resetParserState):
* Source/WebCore/platform/graphics/gstreamer/mse/MediaPlayerPrivateGStreamerMSE.cpp:
(WebCore::MediaPlayerPrivateGStreamerMSE::load):
* Source/WebCore/platform/graphics/gstreamer/mse/WebKitMediaSourceGStreamer.cpp:
(dumpPipeline):
(webKitMediaSrcEmitStreams):
* Source/WebCore/platform/gstreamer/PlatformSpeechSynthesizerGStreamer.cpp:
(WebCore::GstSpeechSynthesisWrapper::GstSpeechSynthesisWrapper):
* Source/WebCore/platform/gtk/PlatformKeyboardEventGtk.cpp:
(WebCore::PlatformKeyboardEvent::keyIdentifierForGdkKeyCode):
* Source/WebCore/platform/ios/UserAgentIOS.mm:
(WebCore::standardUserAgentWithApplicationName):
* Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoDecoder.cpp:
(WebCore::LibWebRTCVPXInternalVideoDecoder::decode):
* Source/WebCore/platform/libwebrtc/LibWebRTCVPXVideoEncoder.cpp:
(WebCore::LibWebRTCVPXVideoEncoder::create):
(WebCore::LibWebRTCVPXInternalVideoEncoder::encode):
* Source/WebCore/platform/libwpe/PlatformKeyboardEventLibWPE.cpp:
(WebCore::PlatformKeyboardEvent::keyIdentifierForWPEKeyCode):
* Source/WebCore/platform/mac/UserAgentMac.mm:
(WebCore::standardUserAgentWithApplicationName):
* Source/WebCore/platform/mediastream/mac/CGDisplayStreamScreenCaptureSource.mm:
(WebCore::CGDisplayStreamScreenCaptureSource::screenCaptureDevices):
(WebCore::CGDisplayStreamScreenCaptureSource::screenCaptureDeviceForMainDisplay):
* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitCaptureSource.mm:
(WebCore::ScreenCaptureKitCaptureSource::sessionFilterDidChange):
* Source/WebCore/platform/mediastream/mac/ScreenCaptureKitSharingSessionManager.mm:
(WebCore::ScreenCaptureKitSharingSessionManager::completeDeviceSelection):
* Source/WebCore/platform/mock/MockRealtimeVideoSource.cpp:
(WebCore::MockRealtimeVideoSource::drawText):
* Source/WebCore/platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::createDataSegment):
* Source/WebCore/platform/network/CredentialBase.cpp:
(WebCore::CredentialBase::serializationForBasicAuthorizationHeader const):
* Source/WebCore/platform/network/HTTPParsers.cpp:
(WebCore::parseHTTPHeader):
* Source/WebCore/platform/network/ParsedContentRange.cpp:
(WebCore::ParsedContentRange::headerValue const):
* Source/WebCore/platform/network/ResourceResponseBase.cpp:
(WebCore::ResourceResponseBase::sanitizeSuggestedFilename):
* Source/WebCore/platform/network/cocoa/RangeResponseGenerator.mm:
(WebCore::synthesizedResponseForRange):
* Source/WebCore/platform/network/curl/CookieJarDB.cpp:
(WebCore::CookieJarDB::verifySchemaVersion):
(WebCore::CookieJarDB::hasCookies):
(WebCore::CookieJarDB::searchCookies):
* Source/WebCore/platform/network/curl/CurlMultipartHandle.cpp:
(WebCore::extractBoundary):
* Source/WebCore/platform/network/soup/AuthenticationChallengeSoup.cpp:
(WebCore::protectionSpaceFromSoupAuthAndURL):
* Source/WebCore/platform/playstation/UserAgentPlayStation.cpp:
(WebCore::standardUserAgentStatic):
* Source/WebCore/platform/sql/SQLiteDatabase.cpp:
(WebCore::unauthorizedSQLFunction):
(WebCore::SQLiteDatabase::setMaximumSize):
(WebCore::SQLiteDatabase::setSynchronous):
(WebCore::SQLiteDatabase::clearAllTables):
* Source/WebCore/platform/unix/SharedMemoryUnix.cpp:
(WebCore::createSharedMemory):
* Source/WebCore/platform/win/KeyEventWin.cpp:
(WebCore::keyIdentifierForWindowsKeyCode):
* Source/WebCore/platform/win/SearchPopupMenuDB.cpp:
(WebCore::SearchPopupMenuDB::verifySchemaVersion):
* Source/WebCore/platform/win/UserAgentWin.cpp:
(WebCore::standardUserAgent):
* Source/WebCore/platform/xr/openxr/OpenXRUtils.h:
(PlatformXR::resultToString):
* Source/WebCore/rendering/RenderLayer.cpp:
(WebCore::RenderLayer::debugDescription const):
* Source/WebCore/rendering/adwaita/RenderThemeAdwaita.cpp:
(WebCore::RenderThemeAdwaita::mediaControlsBase64StringForIconNameAndType):
* Source/WebCore/svg/SVGFitToViewBox.cpp:
(WebCore::SVGFitToViewBox::parseViewBoxGeneric):
* Source/WebCore/testing/Internals.cpp:
(WebCore::Internals::address):
(WebCore::Internals::configurationForViewport):
(WebCore::Internals::createTemporaryFile):
(WebCore::Internals::queueMicroTask):
* Source/WebCore/testing/MockContentFilterSettings.cpp:
(WebCore::MockContentFilterSettings::unblockRequestURL const):
* Source/WebCore/testing/MockPageOverlayClient.cpp:
(WebCore::MockPageOverlayClient::mouseEvent):
* Source/WebCore/workers/WorkerScriptLoader.cpp:
(WebCore::constructJavaScriptMIMETypeError):
(WebCore::WorkerScriptLoader::validateWorkerResponse):
* Source/WebCore/workers/service/FetchEvent.cpp:
(WebCore::FetchEvent::createResponseError):
* Source/WebCore/workers/service/SWClientConnection.cpp:
(WebCore::SWClientConnection::startScriptFetchForServer):
* Source/WebCore/workers/service/ServiceWorkerClients.cpp:
(WebCore::ServiceWorkerClients::openWindow):
* Source/WebCore/workers/service/ServiceWorkerJob.cpp:
(WebCore::ServiceWorkerJob::notifyFinished):
* Source/WebCore/workers/service/ServiceWorkerJobDataIdentifier.h:
(WebCore::ServiceWorkerJobDataIdentifier::loggingString const):
* Source/WebCore/workers/service/ServiceWorkerWindowClient.cpp:
(WebCore::ServiceWorkerWindowClient::navigate):
* Source/WebCore/workers/service/server/SWRegistrationDatabase.cpp:
(WebCore::databaseFilePath):
* Source/WebCore/workers/service/server/SWServerJobQueue.cpp:
(WebCore::SWServerJobQueue::scriptFetchFinished):
* Source/WebCore/xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::prepareToSend):
(WebCore::XMLHttpRequest::send):
* Source/WebCore/xml/parser/XMLDocumentParserLibxml2.cpp:
(WebCore::openFunc):
* Source/WebDriver/Session.cpp:
(WebDriver::Session::getElementProperty):
(WebDriver::Session::getElementCSSValue):
* Source/WebDriver/WebDriverService.cpp:
(WebDriver::deserializeProxy):
(WebDriver::WebDriverService::processCapabilities const):
(WebDriver::WebDriverService::connectToBrowser):
* Source/WebDriver/socket/SessionHostSocket.cpp:
(WebDriver::SessionHost::connectToBrowser):

Canonical link: https://commits.webkit.org/278671@main
  • Loading branch information
cdumez committed May 13, 2024
1 parent 47c3159 commit a22beaf
Show file tree
Hide file tree
Showing 241 changed files with 550 additions and 549 deletions.
4 changes: 2 additions & 2 deletions Source/WebCore/Modules/airplay/WebMediaSessionManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class WebMediaSessionLogger {
if (!state->client.alwaysOnLoggingAllowed())
return;

m_logger->logAlways(LogMedia, makeString("WebMediaSessionManager::", methodName, ' '), state->contextId.toUInt64(), state->flags, arguments...);
m_logger->logAlways(LogMedia, makeString("WebMediaSessionManager::"_s, span(methodName), ' '), state->contextId.toUInt64(), state->flags, arguments...);
}

template<typename... Arguments>
Expand All @@ -123,7 +123,7 @@ class WebMediaSessionLogger {
if (!m_manager.alwaysOnLoggingAllowed())
return;

m_logger->logAlways(LogMedia, makeString("WebMediaSessionManager::", methodName, ' '), arguments...);
m_logger->logAlways(LogMedia, makeString("WebMediaSessionManager::"_s, span(methodName), ' '), arguments...);
}

private:
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/Modules/applepay/ApplePayRequestBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ static ExceptionOr<Vector<String>> convertAndValidate(Document& document, unsign
for (auto& supportedNetwork : supportedNetworks) {
auto validatedNetwork = paymentCoordinator.validatedPaymentNetwork(document, version, supportedNetwork);
if (!validatedNetwork)
return Exception { ExceptionCode::TypeError, makeString("\"", supportedNetwork, "\" is not a valid payment network.") };
return Exception { ExceptionCode::TypeError, makeString("\""_s, supportedNetwork, "\" is not a valid payment network."_s) };
result.append(*validatedNetwork);
}

Expand All @@ -61,7 +61,7 @@ static ExceptionOr<Vector<String>> convertAndValidate(Document& document, unsign
ExceptionOr<ApplePaySessionPaymentRequest> convertAndValidate(Document& document, unsigned version, const ApplePayRequestBase& request, const PaymentCoordinator& paymentCoordinator)
{
if (!version || !paymentCoordinator.supportsVersion(document, version))
return Exception { ExceptionCode::InvalidAccessError, makeString('"', version, "\" is not a supported version.") };
return Exception { ExceptionCode::InvalidAccessError, makeString('"', version, "\" is not a supported version."_s) };

ApplePaySessionPaymentRequest result;
result.setVersion(version);
Expand Down
10 changes: 5 additions & 5 deletions Source/WebCore/Modules/applepay/ApplePaySession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ WTF_MAKE_ISO_ALLOCATED_IMPL(ApplePaySession);
static ExceptionOr<ApplePayLineItem> convertAndValidateTotal(ApplePayLineItem&& lineItem)
{
if (!isValidDecimalMonetaryValue(lineItem.amount))
return Exception { ExceptionCode::TypeError, makeString("\"" + lineItem.amount, "\" is not a valid amount.") };
return Exception { ExceptionCode::TypeError, makeString("\""_s, lineItem.amount, "\" is not a valid amount."_s) };

auto validatedTotal = PaymentRequestValidator::validateTotal(lineItem);
if (validatedTotal.hasException())
Expand All @@ -94,7 +94,7 @@ static ExceptionOr<ApplePayLineItem> convertAndValidate(ApplePayLineItem&& lineI
lineItem.amount = nullString();
} else {
if (!isValidDecimalMonetaryValue(lineItem.amount))
return Exception { ExceptionCode::TypeError, makeString("\"" + lineItem.amount, "\" is not a valid amount.") };
return Exception { ExceptionCode::TypeError, makeString("\""_s, lineItem.amount, "\" is not a valid amount."_s) };
}

return WTFMove(lineItem);
Expand All @@ -121,7 +121,7 @@ static ExceptionOr<Vector<ApplePayLineItem>> convertAndValidate(std::optional<Ve
static ExceptionOr<ApplePayShippingMethod> convertAndValidate(ApplePayShippingMethod&& shippingMethod)
{
if (!isValidDecimalMonetaryValue(shippingMethod.amount))
return Exception { ExceptionCode::TypeError, makeString("\"" + shippingMethod.amount, "\" is not a valid amount.") };
return Exception { ExceptionCode::TypeError, makeString("\""_s, shippingMethod.amount, "\" is not a valid amount."_s) };

return WTFMove(shippingMethod);
}
Expand Down Expand Up @@ -151,7 +151,7 @@ static ExceptionOr<ApplePayRecurringPaymentRequest> convertAndValidate(ApplePayR
if (!regularBilling.label)
return Exception(ExceptionCode::TypeError, "Missing label for 'regularBilling'."_s);
if (!isValidDecimalMonetaryValue(regularBilling.amount) && regularBilling.type != ApplePayLineItem::Type::Pending)
return Exception(ExceptionCode::TypeError, makeString('"', regularBilling.amount, "\" is not a valid amount."));
return Exception(ExceptionCode::TypeError, makeString('"', regularBilling.amount, "\" is not a valid amount."_s));

if (auto& trialBilling = recurringPaymentRequest.trialBilling) {
if (trialBilling->paymentTiming != ApplePayPaymentTiming::Recurring)
Expand Down Expand Up @@ -203,7 +203,7 @@ static ExceptionOr<ApplePayAutomaticReloadPaymentRequest> convertAndValidate(App
static ExceptionOr<ApplePayPaymentTokenContext> convertAndValidate(ApplePayPaymentTokenContext&& tokenContext)
{
if (!isValidDecimalMonetaryValue(tokenContext.amount))
return Exception { ExceptionCode::TypeError, makeString("\"" + tokenContext.amount, "\" is not a valid amount.") };
return Exception { ExceptionCode::TypeError, makeString("\""_s, tokenContext.amount, "\" is not a valid amount."_s) };

return WTFMove(tokenContext);
}
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/Modules/applepay/PaymentRequestValidator.mm
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@
return { };
}

return Exception { ExceptionCode::TypeError, makeString("\"" + countryCode, "\" is not a valid country code.") };
return Exception { ExceptionCode::TypeError, makeString("\""_s, countryCode, "\" is not a valid country code."_s) };
}

static ExceptionOr<void> validateCurrencyCode(const String& currencyCode)
Expand All @@ -138,7 +138,7 @@
return { };
}

return Exception { ExceptionCode::TypeError, makeString("\"" + currencyCode, "\" is not a valid currency code.") };
return Exception { ExceptionCode::TypeError, makeString("\""_s, currencyCode, "\" is not a valid currency code."_s) };
}

static ExceptionOr<void> validateMerchantCapabilities(const ApplePaySessionPaymentRequest::MerchantCapabilities& merchantCapabilities)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ PaymentCoordinator& ApplePayPaymentHandler::paymentCoordinator() const
static ExceptionOr<void> validate(const PaymentCurrencyAmount& amount, const String& expectedCurrency)
{
if (amount.currency != expectedCurrency)
return Exception { ExceptionCode::TypeError, makeString("\"", amount.currency, "\" does not match the expected currency of \"", expectedCurrency, "\". Apple Pay requires all PaymentCurrencyAmounts to use the same currency code.") };
return Exception { ExceptionCode::TypeError, makeString("\""_s, amount.currency, "\" does not match the expected currency of \""_s, expectedCurrency, "\". Apple Pay requires all PaymentCurrencyAmounts to use the same currency code."_s) };
return { };
}

Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/cache/DOMCacheEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ Exception convertToExceptionAndLog(ScriptExecutionContext* context, Error error)
{
auto exception = convertToException(error);
if (context)
context->addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("Cache API operation failed: ", exception.message()));
context->addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("Cache API operation failed: "_s, exception.message()));
return exception;
}

Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/cache/DOMCacheStorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ static void logConsolePersistencyError(ScriptExecutionContext* context, const St
if (!context)
return;

context->addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("There was an error making ", cacheName, " persistent on the filesystem"));
context->addConsoleMessage(MessageSource::JS, MessageLevel::Error, makeString("There was an error making "_s, cacheName, " persistent on the filesystem"_s));
}

void DOMCacheStorage::open(const String& name, DOMPromiseDeferred<IDLInterface<DOMCache>>&& promise)
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/Modules/cookie-store/CookieStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ void CookieStore::set(CookieInit&& options, Ref<DeferredPromise>&& promise)

// FIXME: <rdar://85515842> Obtain the encoded length without allocating and encoding.
if (cookie.domain.utf8().length() > maximumAttributeValueSize) {
promise->reject(Exception { ExceptionCode::TypeError, makeString("The size of the domain must not be greater than ", maximumAttributeValueSize, " bytes") });
promise->reject(Exception { ExceptionCode::TypeError, makeString("The size of the domain must not be greater than "_s, maximumAttributeValueSize, " bytes"_s) });
return;
}
}
Expand All @@ -399,7 +399,7 @@ void CookieStore::set(CookieInit&& options, Ref<DeferredPromise>&& promise)

// FIXME: <rdar://85515842> Obtain the encoded length without allocating and encoding.
if (cookie.path.utf8().length() > maximumAttributeValueSize) {
promise->reject(Exception { ExceptionCode::TypeError, makeString("The size of the path must not be greater than ", maximumAttributeValueSize, " bytes") });
promise->reject(Exception { ExceptionCode::TypeError, makeString("The size of the path must not be greater than "_s, maximumAttributeValueSize, " bytes"_s) });
return;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ void provideMediaKeySystemTo(Page& page, MediaKeySystemClient& client)
void MediaKeySystemController::logRequestMediaKeySystemDenial(Document& document)
{
if (RefPtr window = document.domWindow())
window->printErrorMessage(makeString("Not allowed to access MediaKeySystem."));
window->printErrorMessage("Not allowed to access MediaKeySystem."_str);
}

} // namespace WebCore
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/fetch/FetchBody.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ ExceptionOr<FetchBody> FetchBody::extract(Init&& value, String& contentType)
}, [&](RefPtr<DOMFormData>& value) mutable -> ExceptionOr<FetchBody> {
Ref<DOMFormData> domFormData = value.releaseNonNull();
auto formData = FormData::createMultiPart(domFormData.get());
contentType = makeString("multipart/form-data; boundary=", formData->boundary());
contentType = makeString("multipart/form-data; boundary="_s, formData->boundary());
return FetchBody(WTFMove(formData));
}, [&](RefPtr<URLSearchParams>& value) mutable -> ExceptionOr<FetchBody> {
Ref<const URLSearchParams> params = value.releaseNonNull();
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/fetch/FetchBodyConsumer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ RefPtr<DOMFormData> FetchBodyConsumer::packageFormData(ScriptExecutionContext* c
auto form = DOMFormData::create(context, PAL::UTF8Encoding());
auto mimeType = parseMIMEType(contentType);
if (auto multipartBoundary = parseMultipartBoundary(mimeType)) {
auto boundaryWithDashes = makeString("--", *multipartBoundary);
auto boundaryWithDashes = makeString("--"_s, *multipartBoundary);
CString boundary = boundaryWithDashes.utf8();
size_t boundaryLength = boundary.length();

Expand Down
12 changes: 6 additions & 6 deletions Source/WebCore/Modules/fetch/FetchHeaders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ static void removePrivilegedNoCORSRequestHeaders(HTTPHeaderMap& headers)
static ExceptionOr<bool> canWriteHeader(const String& name, const String& value, const String& combinedValue, FetchHeaders::Guard guard)
{
if (!isValidHTTPToken(name))
return Exception { ExceptionCode::TypeError, makeString("Invalid header name: '", name, "'") };
return Exception { ExceptionCode::TypeError, makeString("Invalid header name: '"_s, name, '\'') };
ASSERT(value.isEmpty() || (!isASCIIWhitespaceWithoutFF(value[0]) && !isASCIIWhitespaceWithoutFF(value[value.length() - 1])));
if (!isValidHTTPHeaderValue((value)))
return Exception { ExceptionCode::TypeError, makeString("Header '", name, "' has invalid value: '", value, "'") };
return Exception { ExceptionCode::TypeError, makeString("Header '"_s, name, "' has invalid value: '"_s, value, '\'') };
if (guard == FetchHeaders::Guard::Immutable)
return Exception { ExceptionCode::TypeError, "Headers object's guard is 'immutable'"_s };
if (guard == FetchHeaders::Guard::Request && isForbiddenHeader(name, value))
Expand All @@ -60,7 +60,7 @@ static ExceptionOr<bool> canWriteHeader(const String& name, const String& value,
static ExceptionOr<void> appendSetCookie(const String& value, Vector<String>& setCookieValues, FetchHeaders::Guard guard)
{
if (!isValidHTTPHeaderValue((value)))
return Exception { ExceptionCode::TypeError, makeString("Header 'Set-Cookie' has invalid value: '", value, "'") };
return Exception { ExceptionCode::TypeError, makeString("Header 'Set-Cookie' has invalid value: '"_s, value, '\'') };
if (guard == FetchHeaders::Guard::Immutable)
return Exception { ExceptionCode::TypeError, "Headers object's guard is 'immutable'"_s };

Expand Down Expand Up @@ -181,7 +181,7 @@ ExceptionOr<void> FetchHeaders::append(const String& name, const String& value)
ExceptionOr<void> FetchHeaders::remove(const String& name)
{
if (!isValidHTTPToken(name))
return Exception { ExceptionCode::TypeError, makeString("Invalid header name: '", name, "'") };
return Exception { ExceptionCode::TypeError, makeString("Invalid header name: '"_s, name, '\'') };
if (m_guard == FetchHeaders::Guard::Immutable)
return Exception { ExceptionCode::TypeError, "Headers object's guard is 'immutable'"_s };
if (m_guard == FetchHeaders::Guard::Request && isForbiddenHeaderName(name))
Expand All @@ -206,7 +206,7 @@ ExceptionOr<void> FetchHeaders::remove(const String& name)
ExceptionOr<String> FetchHeaders::get(const String& name) const
{
if (!isValidHTTPToken(name))
return Exception { ExceptionCode::TypeError, makeString("Invalid header name: '"_s, name, "'"_s) };
return Exception { ExceptionCode::TypeError, makeString("Invalid header name: '"_s, name, '\'') };

if (equalIgnoringASCIICase(name, "set-cookie"_s)) {
if (m_setCookieValues.isEmpty())
Expand All @@ -230,7 +230,7 @@ const Vector<String>& FetchHeaders::getSetCookie() const
ExceptionOr<bool> FetchHeaders::has(const String& name) const
{
if (!isValidHTTPToken(name))
return Exception { ExceptionCode::TypeError, makeString("Invalid header name: '", name, "'") };
return Exception { ExceptionCode::TypeError, makeString("Invalid header name: '"_s, name, '\'') };

if (equalIgnoringASCIICase(name, "set-cookie"_s))
return !m_setCookieValues.isEmpty();
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/Modules/fetch/FetchRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,7 @@ ExceptionOr<void> FetchRequest::initializeWith(FetchRequest& input, Init&& init)
ExceptionOr<void> FetchRequest::setBody(FetchBody::Init&& body)
{
if (!methodCanHaveBody(m_request))
return Exception { ExceptionCode::TypeError, makeString("Request has method '", m_request.httpMethod(), "' and cannot have a body") };
return Exception { ExceptionCode::TypeError, makeString("Request has method '"_s, m_request.httpMethod(), "' and cannot have a body"_s) };

ASSERT(scriptExecutionContext());
auto result = extractBody(WTFMove(body));
Expand All @@ -281,7 +281,7 @@ ExceptionOr<void> FetchRequest::setBody(FetchRequest& request)

if (!request.isBodyNull()) {
if (!methodCanHaveBody(m_request))
return Exception { ExceptionCode::TypeError, makeString("Request has method '", m_request.httpMethod(), "' and cannot have a body") };
return Exception { ExceptionCode::TypeError, makeString("Request has method '"_s, m_request.httpMethod(), "' and cannot have a body"_s) };
// FIXME: If body has a readable stream, we should pipe it to this new body stream.
m_body = WTFMove(*request.m_body);
request.setDisturbed();
Expand Down
4 changes: 2 additions & 2 deletions Source/WebCore/Modules/fetch/FetchResponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,11 +151,11 @@ ExceptionOr<Ref<FetchResponse>> FetchResponse::redirect(ScriptExecutionContext&
{
URL requestURL = context.completeURL(url, ScriptExecutionContext::ForceUTF8::Yes);
if (!requestURL.isValid())
return Exception { ExceptionCode::TypeError, makeString("Redirection URL '", requestURL.string(), "' is invalid") };
return Exception { ExceptionCode::TypeError, makeString("Redirection URL '"_s, requestURL.string(), "' is invalid"_s) };
if (requestURL.hasCredentials())
return Exception { ExceptionCode::TypeError, "Redirection URL contains credentials"_s };
if (!ResourceResponse::isRedirectionStatusCode(status))
return Exception { ExceptionCode::RangeError, makeString("Status code ", status, "is not a redirection status code") };
return Exception { ExceptionCode::RangeError, makeString("Status code "_s, status, "is not a redirection status code"_s) };
auto redirectResponse = adoptRef(*new FetchResponse(&context, { }, FetchHeaders::create(FetchHeaders::Guard::Immutable), { }));
redirectResponse->suspendIfNeeded();
redirectResponse->m_internalResponse.setHTTPStatusCode(status);
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/indexeddb/IDBIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ ExceptionOr<void> IDBIndex::setName(const String& name)
return { };

if (m_objectStore.info().hasIndex(name))
return Exception { ExceptionCode::ConstraintError, makeString("Failed set property 'name' on 'IDBIndex': The owning object store already has an index named '", name, "'.") };
return Exception { ExceptionCode::ConstraintError, makeString("Failed set property 'name' on 'IDBIndex': The owning object store already has an index named '"_s, name, "'."_s) };

m_objectStore.transaction().database().renameIndex(*this, name);
m_info.rename(name);
Expand Down
6 changes: 3 additions & 3 deletions Source/WebCore/Modules/indexeddb/IDBKeyData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ String IDBKeyData::loggingString() const
break;
}
case IndexedDB::KeyType::String:
result = "<string> - " + std::get<String>(m_value);
result = makeString("<string> - "_s, std::get<String>(m_value));
break;
case IndexedDB::KeyType::Date:
return makeString("<date> - ", std::get<Date>(m_value).value);
return makeString("<date> - "_s, std::get<Date>(m_value).value);
case IndexedDB::KeyType::Number:
return makeString("<number> - ", std::get<double>(m_value));
return makeString("<number> - "_s, std::get<double>(m_value));
case IndexedDB::KeyType::Max:
return "<maximum>"_s;
case IndexedDB::KeyType::Min:
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/indexeddb/IDBKeyPath.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ bool isIDBKeyPathValid(const IDBKeyPath& keyPath)
String loggingString(const IDBKeyPath& path)
{
auto visitor = WTF::makeVisitor([](const String& string) {
return makeString("< ", string, " >");
return makeString("< "_s, string, " >"_s);
}, [](const Vector<String>& strings) {
if (strings.isEmpty())
return "< >"_str;
Expand Down
2 changes: 1 addition & 1 deletion Source/WebCore/Modules/indexeddb/IDBObjectStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ ExceptionOr<void> IDBObjectStore::setName(const String& name)
return { };

if (m_transaction.database().info().hasObjectStore(name))
return Exception { ExceptionCode::ConstraintError, makeString("Failed set property 'name' on 'IDBObjectStore': The database already has an object store named '", name, "'.") };
return Exception { ExceptionCode::ConstraintError, makeString("Failed set property 'name' on 'IDBObjectStore': The database already has an object store named '"_s, name, "'."_s) };

m_transaction.database().renameObjectStore(*this, name);
m_info.rename(name);
Expand Down
Loading

0 comments on commit a22beaf

Please sign in to comment.