Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Use asynchronous ResourceHandleClient calls for WebKit1
https://bugs.webkit.org/show_bug.cgi?id=160677 Reviewed by Brady Eidson. Source/WebCore: Covered by existing tests. * PlatformAppleWin.cmake: * PlatformMac.cmake: * WebCore.xcodeproj/project.pbxproj: * loader/ResourceLoader.cpp: (WebCore::ResourceLoader::willSendRequestAsync): (WebCore::ResourceLoader::didReceiveResponseAsync): (WebCore::ResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): * loader/ResourceLoader.h: * loader/appcache/ApplicationCacheGroup.cpp: (WebCore::ApplicationCacheGroup::didReceiveResponseAsync): (WebCore::ApplicationCacheGroup::willSendRequestAsync): (WebCore::ApplicationCacheGroup::canAuthenticateAgainstProtectionSpaceAsync): (WebCore::ApplicationCacheGroup::didReceiveResponse): Deleted. * loader/appcache/ApplicationCacheGroup.h: * platform/network/BlobResourceHandle.cpp: (WebCore::BlobResourceHandle::continueDidReceiveResponse): (WebCore::BlobResourceHandle::getSizeForNext): (WebCore::BlobResourceHandle::notifyResponseOnSuccess): (WebCore::BlobResourceHandle::notifyResponseOnError): * platform/network/PingHandle.h: * platform/network/ResourceHandle.cpp: (WebCore::ResourceHandle::didReceiveResponse): (WebCore::ResourceHandle::usesAsyncCallbacks): Deleted. * platform/network/ResourceHandle.h: * platform/network/ResourceHandleClient.cpp: (WebCore::ResourceHandleClient::~ResourceHandleClient): (WebCore::ResourceHandleClient::willSendRequest): Deleted. (WebCore::ResourceHandleClient::willSendRequestAsync): Deleted. (WebCore::ResourceHandleClient::didReceiveResponseAsync): Deleted. (WebCore::ResourceHandleClient::canAuthenticateAgainstProtectionSpaceAsync): Deleted. * platform/network/ResourceHandleClient.h: (WebCore::ResourceHandleClient::didReceiveAuthenticationChallenge): (WebCore::ResourceHandleClient::didReceiveResponse): Deleted. (WebCore::ResourceHandleClient::usesAsyncCallbacks): Deleted. (WebCore::ResourceHandleClient::canAuthenticateAgainstProtectionSpace): Deleted. * platform/network/ResourceHandleInternal.h: (WebCore::ResourceHandleInternal::ResourceHandleInternal): * platform/network/SynchronousLoaderClient.cpp: (WebCore::SynchronousLoaderClient::willSendRequestAsync): (WebCore::SynchronousLoaderClient::canAuthenticateAgainstProtectionSpaceAsync): (WebCore::SynchronousLoaderClient::didReceiveResponseAsync): (WebCore::SynchronousLoaderClient::didFinishLoading): (WebCore::SynchronousLoaderClient::didFail): (WebCore::SynchronousLoaderClient::willSendRequest): Deleted. (WebCore::SynchronousLoaderClient::canAuthenticateAgainstProtectionSpace): Deleted. (WebCore::SynchronousLoaderClient::didReceiveResponse): Deleted. * platform/network/SynchronousLoaderClient.h: * platform/network/cf/ResourceHandleCFNet.cpp: (WebCore::ResourceHandle::createCFURLConnection): (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::willSendRequest): (WebCore::ResourceHandle::shouldUseCredentialStorage): (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace): (WebCore::ResourceHandle::platformLoadResourceSynchronously): * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.cpp: (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::ResourceHandleCFURLConnectionDelegateWithOperationQueue): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::releaseHandle): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willSendRequest): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFinishLoading): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didFail): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::willCacheResponse): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didReceiveChallenge): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::didSendBodyData): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::shouldUseCredentialStorage): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::canRespondToProtectionSpace): (WebCore::ResourceHandleCFURLConnectionDelegateWithOperationQueue::continueCanAuthenticateAgainstProtectionSpace): * platform/network/cf/ResourceHandleCFURLConnectionDelegateWithOperationQueue.h: * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.cpp: Removed. * platform/network/cf/SynchronousResourceHandleCFURLConnectionDelegate.h: Removed. * platform/network/mac/ResourceHandleMac.mm: (WebCore::ResourceHandle::start): (WebCore::ResourceHandle::schedule): (WebCore::ResourceHandle::makeDelegate): (WebCore::ResourceHandle::delegate): (WebCore::ResourceHandle::platformLoadResourceSynchronously): (WebCore::ResourceHandle::willSendRequest): (WebCore::ResourceHandle::continueWillSendRequest): (WebCore::ResourceHandle::continueDidReceiveResponse): (WebCore::ResourceHandle::canAuthenticateAgainstProtectionSpace): (WebCore::ResourceHandle::continueCanAuthenticateAgainstProtectionSpace): (WebCore::ResourceHandle::continueWillCacheResponse): (WebCore::ResourceHandle::shouldUseCredentialStorage): Deleted. * platform/network/mac/WebCoreResourceHandleAsDelegate.h: Removed. * platform/network/mac/WebCoreResourceHandleAsDelegate.mm: Removed. * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.h: * platform/network/mac/WebCoreResourceHandleAsOperationQueueDelegate.mm: (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willSendRequest:redirectResponse:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveAuthenticationChallenge:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:canAuthenticateAgainstProtectionSpace:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveResponse:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didReceiveData:lengthReceived:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didSendBodyData:totalBytesWritten:totalBytesExpectedToWrite:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:didFailWithError:]): (-[WebCoreResourceHandleAsOperationQueueDelegate connection:willCacheResponse:]): Source/WebKitLegacy: * WebCoreSupport/WebResourceLoadScheduler.cpp: (WebResourceLoadScheduler::createPingHandle): LayoutTests: * TestExpectations: * platform/gtk/TestExpectations: * platform/ios-wk2/TestExpectations: * platform/mac-wk2/TestExpectations: * platform/wk2/TestExpectations: http/tests/cache/iframe-304-crash.html used to deterministically record its didFinishLoading callback, but only for WK1. It was marked as flaky for all WK2 ports. It is now flaky in WK1 because the order of the testRunner.notifyDone call and the didFinishLoading logging is no longer deterministic with asynchronous loading, but the test still verifies that there is no crash. http/tests/security/cross-origin-modal-dialog-base.html does navigation during showModalDialog, which probably should've never worked in WK1 and never worked in WK2. WK1 behavior now matches WK2 behavior. I'm not aware of any complaints about no navigation working during showModalDialog in WK2 and I imagine nobody will be regressed by this change, but if we do find such a problem, creative use of MessageQueues like we do with sync xhr in WK1 now could theoretically fix the problem, but we are trying to get rid of showModalDialog anyway. The test was written to verify that the SecurityOrigin doesn't fall back to the wrong origin, and it certainly doesn't now. These tests dump load delegate call order, which are less deterministic now but the tests still behave correctly. http/tests/svg/svg-use-external.html http/tests/loading/text-content-type-with-binary-extension.html http/tests/security/contentSecurityPolicy/block-all-mixed-content/insecure-iframe-in-main-frame.html Canonical link: https://commits.webkit.org/194488@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223271 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information