New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make the StringView(const char*) constructor explicit #879
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 21, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 21, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 21, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 21, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 21, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 21, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 21, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 21, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 21, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 21, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 21, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 21, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 21, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 21, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 23, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 23, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 23, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 23, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 23, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 23, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 23, 2022
https://bugs.webkit.org/show_bug.cgi?id=240754 Reviewed by NOBODY (OOPS!). Make the StringView(const char*) constructor explicit, to encourage people to use ASCIILiteral / ""_s. StringView::fromLatin1() is available when the caller really has a non-string literal. In a future patch, I will make this constructor private. * Source/WTF/wtf/Assertions.cpp: * Source/WTF/wtf/text/StringBuilder.h: (WTF::StringBuilder::append): * Source/WTF/wtf/text/StringView.h: * Source/WebCore/Modules/mediastream/libwebrtc/LibWebRTCRtpTransceiverBackend.cpp: (WebCore::toRtpCodecCapability): * Source/WebCore/css/typedom/ComputedStylePropertyMapReadOnly.cpp: (WebCore::ComputedStylePropertyMapReadOnly::entries const): * Source/WebCore/dom/DatasetDOMStringMap.cpp: (WebCore::isValidAttributeName): (WebCore::propertyNameMatchesAttributeName): * Source/WebCore/dom/ViewportArguments.cpp: (WebCore::viewportErrorMessage): * Source/WebCore/editing/cocoa/HTMLConverter.mm: (HTMLConverterCaches::elementHasOwnBackgroundColor): * Source/WebCore/history/BackForwardCache.cpp: (WebCore::canCacheFrame): * Source/WebCore/html/URLDecomposition.cpp: (WebCore::URLDecomposition::setPort): * Source/WebCore/html/track/WebVTTParser.cpp: (WebCore::WebVTTParser::checkAndCreateRegion): (WebCore::WebVTTParser::checkAndStoreStyleSheet): * Source/WebCore/loader/PrivateClickMeasurement.cpp: (WebCore::PrivateClickMeasurement::parseAttributionRequest): (WebCore::PrivateClickMeasurement::appStoreURLAdamID): * Source/WebCore/loader/mac/LoaderNSURLExtras.mm: (suggestedFilenameWithMIMEType): * Source/WebCore/platform/graphics/angle/GraphicsContextGLANGLE.cpp: (WebCore::GraphicsContextGLANGLE::getUnmangledInfoLog): * Source/WebCore/platform/graphics/avfoundation/CDMPrivateMediaSourceAVFObjC.mm: (WebCore::CDMPrivateMediaSourceAVFObjC::parseKeySystem): * Source/WebKit/NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp: (WebKit::ResourceLoadStatisticsDatabaseStore::migrateDataToPCMDatabaseIfNecessary): (WebKit::ResourceLoadStatisticsDatabaseStore::aggregatedThirdPartyData const): * Source/WebKit/NetworkProcess/NetworkSchemeRegistry.cpp: (WebKit::NetworkSchemeRegistry::shouldTreatURLSchemeAsCORSEnabled): * Source/WebKit/NetworkProcess/WebStorage/LocalStorageDatabaseTracker.cpp: (WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker): * Source/WebKit/NetworkProcess/cache/NetworkCacheBlobStorage.cpp: (WebKit::NetworkCache::BlobStorage::blobPathForHash const): * Source/WebKit/NetworkProcess/cache/NetworkCacheStorage.cpp: * Source/WebKit/Platform/unix/EnvironmentUtilities.cpp: (WebKit::EnvironmentUtilities::removeValuesEndingWith): * Source/WebKit/Shared/Cocoa/XPCEndpoint.mm: (WebKit::XPCEndpoint::XPCEndpoint): * Source/WebKit/Shared/EntryPointUtilities/Cocoa/XPCService/XPCServiceEntryPoint.mm: (WebKit::XPCServiceInitializerDelegate::getProcessIdentifier): * Source/WebKit/UIProcess/API/APIContentRuleListStore.cpp: (API::constructedPathPrefix): * Source/WebKit/UIProcess/API/APIProcessPoolConfiguration.h: * Source/WebKit/UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: (-[_WKProcessPoolConfiguration additionalReadAccessAllowedURLs]): (-[_WKProcessPoolConfiguration setAdditionalReadAccessAllowedURLs:]): * Source/WebKit/UIProcess/Cocoa/WebPageProxyCocoa.mm: (WebKit::WebPageProxy::createSandboxExtensionsIfNeeded): (WebKit::WebPageProxy::isQuarantinedAndNotUserApproved): * Source/WebKit/UIProcess/Cocoa/WebProcessProxyCocoa.mm: (WebKit::WebProcessProxy::messageSourceIsValidWebContentProcess): * Source/WebKit/UIProcess/DeviceIdHashSaltStorage.cpp: (WebKit::DeviceIdHashSaltStorage::deleteHashSaltFromDisk): * Source/WebKit/UIProcess/ViewGestureController.cpp: (WebKit::ViewGestureController::SnapshotRemovalTracker::resume): (WebKit::ViewGestureController::SnapshotRemovalTracker::start): (WebKit::ViewGestureController::SnapshotRemovalTracker::fireRemovalCallbackImmediately): (WebKit::ViewGestureController::SnapshotRemovalTracker::watchdogTimerFired): * Source/WebKit/UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle): (WebKit::WebPageProxy::savePDFToFileInDownloadsFolder): * Source/WebKit/UIProcess/WebProcessPool.cpp: (WebKit::WebProcessPool::resolvePathsForSandboxExtensions): * Source/WebKit/UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication): * Source/WebKit/UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::shouldAllowNonValidInjectedCode const): * Source/WebKit/WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetDatabaseQuota): * Source/WebKit/WebProcess/Network/WebLoaderStrategy.cpp: (WebKit::WebLoaderStrategy::tryLoadingUsingPDFJSHandler): * Source/WebKit/WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::streamDidReceiveResponse): * Source/WebKit/WebProcess/WebPage/WebPage.cpp: (WebKit::dumpHistoryItem): * Source/WebKit/WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::shouldUsePDFPlugin const): (WebKit::WebPage::platformCanHandleRequest): * Source/WebKit/webpushd/AppBundleRequest.mm: (WebPushD::AppBundleRequest::start): * Source/WebKit/webpushd/PushClientConnection.mm: (WebPushD::ClientConnection::connectionClosed): * Source/WebKit/webpushd/WebPushDaemon.mm: (WebPushD::Daemon::broadcastAllConnectionIdentities): (WebPushD::Daemon::injectPushMessageForTesting): (WebPushD::Daemon::injectEncryptedPushMessageForTesting): * Source/WebKitLegacy/mac/WebView/WebHTMLRepresentation.mm: (regExpForLabels): (matchLabelsAgainstString): * Tools/DumpRenderTree/mac/DumpRenderTree.mm: (changeWindowScaleIfNeeded): * Tools/TestWebKitAPI/Tests/WTF/FileSystem.cpp: (TestWebKitAPI::TEST_F): * Tools/TestWebKitAPI/Tests/WTF/SortedArrayMap.cpp: (TEST): * Tools/TestWebKitAPI/Tests/WTF/StringImpl.cpp: (TestWebKitAPI::TEST): (TestWebKitAPI::doStaticStringImplTests): * Tools/TestWebKitAPI/Tests/WTF/StringToIntegerConversion.cpp: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WTF/StringView.cpp: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WTF/URL.cpp: (TestWebKitAPI::TEST_F): * Tools/TestWebKitAPI/Tests/WTF/URLParser.cpp: (TestWebKitAPI::invalidParts): (TestWebKitAPI::shouldFail): (TestWebKitAPI::TEST_F): (TestWebKitAPI::testUserPassword): * Tools/TestWebKitAPI/Tests/WTF/UUID.cpp: (TEST): * Tools/TestWebKitAPI/Tests/WebCore/ContentExtensions.cpp: (TestWebKitAPI::TEST_F): * Tools/TestWebKitAPI/Tests/WebCore/DFACombiner.cpp: (TestWebKitAPI::TEST_F): * Tools/TestWebKitAPI/Tests/WebCore/DFAHelpers.h: (TestWebKitAPI::buildDFAFromPatterns): * Tools/TestWebKitAPI/Tests/WebCore/DFAMinimizer.cpp: (TestWebKitAPI::TEST_F): * Tools/TestWebKitAPI/Tests/WebCore/FileMonitor.cpp: (TestWebKitAPI::readContentsOfFile): * Tools/TestWebKitAPI/Tests/WebCore/HTMLParserIdioms.cpp: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebCore/HTTPParsers.cpp: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebKit/EnvironmentUtilitiesTest.cpp: (TestWebKitAPI::testStrip): (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/ContentRuleListNotification.mm: (TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/CopyHTML.mm: (TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/FTP.mm: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/IDBCheckpointWAL.mm: (TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/IDBIndexUpgradeToV2.mm: (TEST): (runMultipleIndicesTestWithDatabase): * Tools/TestWebKitAPI/Tests/WebKitCocoa/IDBObjectStoreInfoUpgradeToV2.mm: (TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBFileName.mm: (TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBPersistence.mm: * Tools/TestWebKitAPI/Tests/WebKitCocoa/IndexedDBTempFileSize.mm: (TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaLoading.mm: (TestWebKitAPI::parseUserAgent): * Tools/TestWebKitAPI/Tests/WebKitCocoa/MediaSession.mm: (TestWebKitAPI::TEST_F): * Tools/TestWebKitAPI/Tests/WebKitCocoa/PrivateClickMeasurement.mm: (addAttributedPCMv2): (addUnattributedPCMv2): (addAttributedPCMv3): (addUnattributedPCMv3): (addUnattributedPCMv4): (addAttributedPCMv4): (addAttributedPCMv5): (createAndPopulateObservedDomainTable): (createAndPopulatePCMObservedDomainTable): * Tools/TestWebKitAPI/Tests/WebKitCocoa/ProcessSwapOnNavigation.mm: * Tools/TestWebKitAPI/Tests/WebKitCocoa/ServiceWorkerBasic.mm: (-[ServiceWorkerSchemeHandler webView:startURLSchemeTask:]): * Tools/TestWebKitAPI/Tests/WebKitCocoa/StorageQuota.mm: * Tools/TestWebKitAPI/Tests/WebKitCocoa/StoreBlobThenDelete.mm: (TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WKURLSchemeHandler-1.mm: * Tools/TestWebKitAPI/Tests/WebKitCocoa/WebSocket.mm: (TestWebKitAPI::TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsiteDataStoreCustomPaths.mm: (TEST): * Tools/TestWebKitAPI/Tests/WebKitCocoa/WebsitePolicies.mm: (ParsedRange::ParsedRange): * Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: (WTR::InjectedBundlePage::didFinishProgress): (WTR::InjectedBundlePage::dump): (WTR::InjectedBundlePage::didDisplayInsecureContentForFrame): (WTR::InjectedBundlePage::didRunInsecureContentForFrame): (WTR::InjectedBundlePage::didDetectXSSForFrame): (WTR::InjectedBundlePage::willSendRequestForFrame): (WTR::InjectedBundlePage::willAddMessageToConsole): (WTR::InjectedBundlePage::supportsFullScreen): (WTR::InjectedBundlePage::enterFullScreenForElement): (WTR::InjectedBundlePage::exitFullScreenForElement): (WTR::InjectedBundlePage::beganEnterFullScreen): (WTR::InjectedBundlePage::beganExitFullScreen): (WTR::InjectedBundlePage::closeFullScreen): * Tools/WebKitTestRunner/TestController.cpp: (WTR::TestController::configureContentExtensionForTest): * Tools/WebKitTestRunner/TestInvocation.cpp: (WTR::TestInvocation::TestInvocation): (WTR::TestInvocation::urlContains const): (WTR::TestInvocation::shouldLogHistoryClientCallbacks const): * Tools/WebKitTestRunner/TestInvocation.h: * Tools/WebKitTestRunner/mac/TestControllerMac.mm: (WTR::TestController::configureContentExtensionForTest):
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 23, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 23, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 23, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 23, 2022
cdumez
added
WebKit Nightly Build
and removed
merging-blocked
Applied to prevent a change from being merged
WebKit Nightly Build
labels
May 23, 2022
webkit-early-warning-system
added
the
merging-blocked
Applied to prevent a change from being merged
label
May 23, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
324438e5a9e11f1a0d68227e6c49ee57c19758f5