Prepare to remove automatic URL->String conversion operators
https://bugs.webkit.org/show_bug.cgi?id=211007
Patch by Alex Christensen <achristensen@webkit.org> on 2020-04-25
Reviewed by Darin Adler.
Source/JavaScriptCore:
* API/JSAPIGlobalObject.mm:
(JSC::JSAPIGlobalObject::moduleLoaderResolve):
(JSC::JSAPIGlobalObject::moduleLoaderImportModule):
* API/JSScript.mm:
(validateBytecodeCachePath):
(+[JSScript scriptOfType:memoryMappedFromASCIIFile:withSourceURL:andBytecodeCache:inVirtualMachine:error:]):
* inspector/ScriptDebugServer.cpp:
(Inspector::ScriptDebugServer::sourceParsed):
* parser/Nodes.h:
(JSC::ScopeNode::sourceURL const):
* runtime/CachedTypes.cpp:
(JSC::CachedSourceProviderShape::encode):
* runtime/Error.cpp:
(JSC::addErrorInfo):
* runtime/ScriptExecutable.h:
(JSC::ScriptExecutable::sourceURL const):
Source/WebCore:
* Modules/cache/DOMCache.cpp:
(WebCore::DOMCache::requestFromInfo):
* Modules/fetch/FetchRequest.cpp:
(WebCore::FetchRequest::urlString const):
* Modules/fetch/FetchResponse.cpp:
(WebCore::FetchResponse::fetch):
* Modules/websockets/WebSocket.cpp:
(WebCore::WebSocket::create):
* accessibility/AccessibilityImageMapLink.cpp:
(WebCore::AccessibilityImageMapLink::stringValueForMSAA const):
* bindings/IDLTypes.h:
(WebCore::IDLString::isNullValue):
* bindings/js/CachedScriptSourceProvider.h:
(WebCore::CachedScriptSourceProvider::CachedScriptSourceProvider):
* bindings/js/JSDOMConvertStrings.h:
(WebCore::JSConverter<IDLDOMString>::convert):
(WebCore::Converter<IDLUSVString>::convert):
(WebCore::JSConverter<IDLUSVString>::convert):
* bindings/js/ScriptController.cpp:
(WebCore::ScriptController::evaluateInWorld):
(WebCore::ScriptController::evaluateModule):
(WebCore::ScriptController::callInWorld):
(WebCore::ScriptController::executeIfJavaScriptURL):
* bindings/js/SerializedScriptValue.cpp:
(WebCore::CloneSerializer::dumpIfTerminal):
(WebCore::CloneSerializer::write):
* css/CSSCursorImageValue.cpp:
(WebCore::CSSCursorImageValue::updateCursorElement):
* css/CSSImageValue.cpp:
(WebCore::CSSImageValue::customCSSText const):
(WebCore::CSSImageValue::createDeprecatedCSSOMWrapper const):
* css/parser/CSSPropertyParser.cpp:
(WebCore::consumeFontFaceSrcURI):
* dom/Document.cpp:
(WebCore::Document::processHttpEquiv):
* dom/ExtensionStyleSheets.cpp:
(WebCore::createExtensionsStyleSheet):
* dom/InlineStyleSheetOwner.cpp:
(WebCore::InlineStyleSheetOwner::createSheet):
* dom/ScriptElement.cpp:
(WebCore::ScriptElement::requestModuleScript):
(WebCore::ScriptElement::executeClassicScript):
* dom/StyledElement.cpp:
(WebCore::StyledElement::styleAttributeChanged):
* editing/cocoa/WebContentReaderCocoa.mm:
(WebCore::sanitizeMarkupWithArchive):
(WebCore::WebContentReader::readWebArchive):
* html/HTMLFormControlElement.cpp:
(WebCore::HTMLFormControlElement::formAction const):
* html/HTMLFrameElementBase.cpp:
(WebCore::HTMLFrameElementBase::canLoadURL const):
* html/HTMLLinkElement.cpp:
(WebCore::HTMLLinkElement::shouldLoadLink):
* html/HTMLMediaElement.cpp:
(WebCore::HTMLMediaElement::selectNextSourceChild):
* html/HTMLPlugInImageElement.cpp:
(WebCore::HTMLPlugInImageElement::canLoadURL const):
* html/parser/XSSAuditor.cpp:
(WebCore::XSSAuditor::filterToken):
* inspector/InspectorAuditResourcesObject.cpp:
(WebCore::InspectorAuditResourcesObject::getResources):
* inspector/InspectorStyleSheet.cpp:
(WebCore::buildArrayForGroupings):
* inspector/NetworkResourcesData.cpp:
(WebCore::NetworkResourcesData::responseReceived):
* inspector/agents/InspectorNetworkAgent.cpp:
(WebCore::InspectorNetworkAgent::buildObjectForCachedResource):
(WebCore::InspectorNetworkAgent::willSendRequest):
* inspector/agents/InspectorPageAgent.cpp:
(WebCore::InspectorPageAgent::getCookies):
(WebCore::InspectorPageAgent::searchInResources):
(WebCore::InspectorPageAgent::buildObjectForFrameTree):
* inspector/agents/InspectorWorkerAgent.cpp:
(WebCore::InspectorWorkerAgent::connectToWorkerInspectorProxy):
* inspector/agents/WebConsoleAgent.cpp:
(WebCore::WebConsoleAgent::didFailLoading):
* inspector/agents/worker/ServiceWorkerAgent.cpp:
(WebCore::ServiceWorkerAgent::getInitializationInfo):
* loader/DocumentLoader.cpp:
(WebCore::DocumentLoader::subresources const):
* loader/DocumentLoader.h:
(WebCore::DocumentLoader::clientRedirectDestinationForHistory const):
(WebCore::DocumentLoader::serverRedirectDestinationForHistory const):
* loader/FrameLoader.cpp:
(WebCore::FrameLoader::submitForm):
(WebCore::FrameLoader::receivedFirstData):
(WebCore::FrameLoader::loadInSameDocument):
(WebCore::FrameLoader::loadedResourceFromMemoryCache):
(WebCore::createWindow):
* loader/HistoryController.cpp:
(WebCore::HistoryController::currentItemShouldBeReplaced const):
* loader/ImageLoader.cpp:
(WebCore::ImageLoader::updateFromElement):
(WebCore::ImageLoader::dispatchPendingBeforeLoadEvent):
* loader/LinkLoader.cpp:
(WebCore::LinkLoader::preloadIfNeeded):
(WebCore::LinkLoader::prefetchIfNeeded):
* loader/MixedContentChecker.cpp:
(WebCore::MixedContentChecker::checkFormForMixedContent const):
* loader/NavigationScheduler.cpp:
(WebCore::NavigationScheduler::shouldScheduleNavigation const):
(WebCore::NavigationScheduler::scheduleLocationChange):
* loader/PingLoader.cpp:
(WebCore::PingLoader::loadImage):
(WebCore::PingLoader::sendPing):
* loader/ResourceLoadNotifier.cpp:
(WebCore::ResourceLoadNotifier::dispatchWillSendRequest):
* loader/SubframeLoader.cpp:
(WebCore::SubframeLoader::requestObject):
* loader/TextTrackLoader.cpp:
(WebCore::TextTrackLoader::load):
* loader/appcache/ApplicationCache.cpp:
(WebCore::ApplicationCache::addResource):
(WebCore::ApplicationCache::resourceForRequest):
* loader/appcache/ApplicationCacheGroup.cpp:
(WebCore::ApplicationCacheGroup::selectCache):
(WebCore::ApplicationCacheGroup::finishedLoadingMainResource):
(WebCore::ApplicationCacheGroup::didFinishLoadingEntry):
(WebCore::ApplicationCacheGroup::didFailLoadingEntry):
(WebCore::ApplicationCacheGroup::didFinishLoadingManifest):
* loader/appcache/ApplicationCacheHost.cpp:
(WebCore::ApplicationCacheHost::shouldLoadResourceFromApplicationCache):
(WebCore::ApplicationCacheHost::getApplicationCacheFallbackResource):
* loader/appcache/ApplicationCacheStorage.cpp:
(WebCore::ApplicationCacheStorage::loadCacheGroup):
(WebCore::ApplicationCacheStorage::findOrCreateCacheGroup):
(WebCore::ApplicationCacheStorage::findInMemoryCacheGroup const):
(WebCore::ApplicationCacheStorage::cacheGroupForURL):
(WebCore::ApplicationCacheStorage::fallbackCacheGroupForURL):
(WebCore::ApplicationCacheStorage::cacheGroupDestroyed):
(WebCore::ApplicationCacheStorage::cacheGroupMadeObsolete):
(WebCore::ApplicationCacheStorage::store):
(WebCore::ApplicationCacheStorage::deleteCacheForOrigin):
* loader/archive/ArchiveResourceCollection.cpp:
(WebCore::ArchiveResourceCollection::addAllResources):
(WebCore::ArchiveResourceCollection::addResource):
(WebCore::ArchiveResourceCollection::archiveResourceForURL):
* loader/cache/CachedCSSStyleSheet.cpp:
(WebCore::CachedCSSStyleSheet::didAddClient):
(WebCore::CachedCSSStyleSheet::checkNotify):
* loader/cache/CachedResourceLoader.cpp:
(WebCore::CachedResourceLoader::cachedResource const):
(WebCore::CachedResourceLoader::requestResource):
(WebCore::CachedResourceLoader::determineRevalidationPolicy const):
(WebCore::CachedResourceLoader::notifyFinished):
* loader/cache/CachedXSLStyleSheet.cpp:
(WebCore::CachedXSLStyleSheet::didAddClient):
(WebCore::CachedXSLStyleSheet::checkNotify):
* page/ContextMenuController.cpp:
(WebCore::ContextMenuController::checkOrEnableIfNeeded const):
* page/DOMWindow.cpp:
(WebCore::DOMWindow::setLocation):
(WebCore::DOMWindow::createWindow):
(WebCore::DOMWindow::open):
* page/Location.cpp:
(WebCore::Location::reload):
* page/PageSerializer.cpp:
(WebCore::PageSerializer::retrieveResourcesForProperties):
* page/SecurityOrigin.cpp:
(WebCore::SecurityOrigin::shouldIgnoreHost):
* page/SecurityPolicy.cpp:
(WebCore::SecurityPolicy::shouldInheritSecurityOriginFromOwner):
(WebCore::SecurityPolicy::isBaseURLSchemeAllowed):
* page/csp/ContentSecurityPolicy.cpp:
(WebCore::ContentSecurityPolicy::reportViolation const):
* platform/graphics/avfoundation/MediaPlayerPrivateAVFoundation.h:
(WebCore::MediaPlayerPrivateAVFoundation::assetURL const):
* platform/network/BlobRegistryImpl.cpp:
(WebCore::BlobRegistryImpl::writeBlobToFilePath):
* platform/network/mac/ResourceErrorMac.mm:
(WebCore::ResourceError::platformLazyInit):
* storage/StorageEventDispatcher.cpp:
(WebCore::StorageEventDispatcher::dispatchSessionStorageEvents):
(WebCore::StorageEventDispatcher::dispatchLocalStorageEvents):
* svg/SVGImageLoader.cpp:
(WebCore::SVGImageLoader::sourceURI const):
* workers/WorkerScriptLoader.cpp:
(WebCore::WorkerScriptLoader::loadSynchronously):
* workers/service/ServiceWorkerRegistration.cpp:
(WebCore::ServiceWorkerRegistration::scope const):
* workers/service/ServiceWorkerRegistrationKey.cpp:
(WebCore::ServiceWorkerRegistrationKey::hash const):
(WebCore::ServiceWorkerRegistrationKey::isMatching const):
* workers/service/context/ServiceWorkerDebuggable.cpp:
(WebCore::ServiceWorkerDebuggable::ServiceWorkerDebuggable):
* workers/service/server/SWServer.cpp:
(WebCore::SWServer::startScriptFetch):
* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::send):
Source/WebKit:
* Shared/API/APIError.h:
(API::Error::failingURL const):
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toCopiedURLAPI):
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(setUpPagePolicyClient):
* UIProcess/Cocoa/SafeBrowsingWarningCocoa.mm:
(WebKit::reportAnErrorURL):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::requestUserMediaAuthorizationForFrame):
(WebKit::UIDelegate::UIClient::checkUserMediaPermissionForOrigin):
* UIProcess/Cocoa/WebPasteboardProxyCocoa.mm:
(WebKit::WebPasteboardProxy::readURLFromPasteboard):
* UIProcess/ProvisionalPageProxy.cpp:
(WebKit::ProvisionalPageProxy::cancel):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
(WebKit::WebPageProxy::loadRequestWithNavigationShared):
(WebKit::WebPageProxy::loadAlternateHTML):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didExplicitOpenForFrame):
(WebKit::WebPageProxy::didReceiveServerRedirectForProvisionalLoadForFrameShared):
(WebKit::WebPageProxy::didChangeProvisionalURLForFrameShared):
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
(WebKit::WebPageProxy::createNewPage):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame URL]):
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::didReceiveResponse):
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::clickedLink):
(WebKit::PDFPlugin::openWithNativeApplication):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::performURLRequest):
(WebKit::PluginView::performJavaScriptURLRequest):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchWillPerformClientRedirect):
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
(WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::info const):
* WebProcess/WebStorage/StorageAreaMap.cpp:
(WebKit::StorageAreaMap::setItem):
(WebKit::StorageAreaMap::removeItem):
(WebKit::StorageAreaMap::clear):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::origin):
Source/WebKitLegacy/mac:
* DOM/DOMDocument.mm:
(-[DOMDocument URL]):
* DOM/DOMHTMLAnchorElement.mm:
(-[DOMHTMLAnchorElement href]):
* DOM/DOMHTMLAreaElement.mm:
(-[DOMHTMLAreaElement href]):
* DOM/DOMHTMLEmbedElement.mm:
(-[DOMHTMLEmbedElement src]):
* DOM/DOMHTMLFormElement.mm:
(-[DOMHTMLFormElement action]):
* DOM/DOMHTMLFrameElement.mm:
(-[DOMHTMLFrameElement src]):
(-[DOMHTMLFrameElement location]):
* DOM/DOMHTMLHtmlElement.mm:
(-[DOMHTMLHtmlElement manifest]):
* DOM/DOMHTMLIFrameElement.mm:
(-[DOMHTMLIFrameElement src]):
* DOM/DOMHTMLImageElement.mm:
(-[DOMHTMLImageElement longDesc]):
(-[DOMHTMLImageElement src]):
(-[DOMHTMLImageElement currentSrc]):
(-[DOMHTMLImageElement lowsrc]):
* DOM/DOMHTMLInputElement.mm:
(-[DOMHTMLInputElement src]):
* DOM/DOMHTMLLinkElement.mm:
(-[DOMHTMLLinkElement href]):
* DOM/DOMHTMLMediaElement.mm:
(-[DOMHTMLMediaElement src]):
(-[DOMHTMLMediaElement currentSrc]):
* DOM/DOMHTMLModElement.mm:
(-[DOMHTMLModElement cite]):
* DOM/DOMHTMLObjectElement.mm:
(-[DOMHTMLObjectElement data]):
* DOM/DOMHTMLQuoteElement.mm:
(-[DOMHTMLQuoteElement cite]):
* DOM/DOMHTMLScriptElement.mm:
(-[DOMHTMLScriptElement src]):
* DOM/DOMHTMLVideoElement.mm:
(-[DOMHTMLVideoElement poster]):
* DOM/DOMNode.mm:
(-[DOMNode baseURI]):
* WebCoreSupport/WebFrameLoaderClient.mm:
(WebFrameLoaderClient::updateGlobalHistory):
(WebFrameLoaderClient::setTitle):
* WebView/WebImmediateActionController.mm:
(-[WebImmediateActionController _animationControllerForDataDetectedLink]):
* WebView/WebNotification.mm:
(-[WebNotification iconURL]):
* WebView/WebScriptDebugger.mm:
(WebScriptDebugger::sourceParsed):
(toNSURL): Deleted.
Source/WTF:
Too many bugs have been caused by the compiler finding a way to make a String from a URL without being visible in the code.
This does all the easy things to prepare to remove operator String& and operator NSString*.
The hard things will be done in the smaller patch that actually removes them.
* wtf/URL.cpp:
(WTF::URL::protocolIsJavaScript const):
* wtf/URL.h:
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@260709 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/Source/WebKitLegacy/mac/WebView/WebNotification.mm b/Source/WebKitLegacy/mac/WebView/WebNotification.mm
index 8beda0d..d1ff835 100644
--- a/Source/WebKitLegacy/mac/WebView/WebNotification.mm
+++ b/Source/WebKitLegacy/mac/WebView/WebNotification.mm
@@ -116,7 +116,7 @@
- (NSString *)iconURL
{
#if ENABLE(NOTIFICATIONS)
- return core(self)->icon();
+ return core(self)->icon().string();
#else
return nil;
#endif