WebKit Bugzilla
Attachment 360517 Details for
Bug 193990
: Remove unused NetworkProcessProxy::writeBlobToFilePath
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-193990-20190129155528.patch (text/plain), 8.59 KB, created by
Alex Christensen
on 2019-01-29 15:55:29 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-01-29 15:55:29 PST
Size:
8.59 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 240686) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,27 @@ >+2019-01-29 Alex Christensen <achristensen@webkit.org> >+ >+ Remove unused NetworkProcessProxy::writeBlobToFilePath >+ https://bugs.webkit.org/show_bug.cgi?id=193990 >+ >+ Reviewed by Wenson Hsieh. >+ >+ This code was only used in code that was introduced in r235202 >+ but that has since been refactored to not use blobs. Its tests still pass. >+ This removes the only UIProcess-controlled code that uses NetworkBlobRegistry::singleton. >+ >+ * NetworkProcess/NetworkProcess.cpp: >+ (WebKit::NetworkProcess::writeBlobToFilePath): Deleted. >+ * NetworkProcess/NetworkProcess.h: >+ * NetworkProcess/NetworkProcess.messages.in: >+ * UIProcess/Cocoa/WebViewImpl.mm: >+ (WebKit::WebViewImpl::writeToURLForFilePromiseProvider): >+ * UIProcess/Network/NetworkProcessProxy.cpp: >+ (WebKit::NetworkProcessProxy::writeBlobToFilePath): Deleted. >+ * UIProcess/Network/NetworkProcessProxy.h: >+ * UIProcess/WebPageProxy.cpp: >+ (WebKit::WebPageProxy::writeBlobToFilePath): Deleted. >+ * UIProcess/WebPageProxy.h: >+ > 2019-01-29 Devin Rousso <drousso@apple.com> > > Web Inspector: expose a way of determining if a detached frontend is for a remote target >Index: Source/WebKit/NetworkProcess/NetworkProcess.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.cpp (revision 240683) >+++ Source/WebKit/NetworkProcess/NetworkProcess.cpp (working copy) >@@ -559,21 +559,6 @@ void NetworkProcess::destroySession(cons > #endif > } > >-void NetworkProcess::writeBlobToFilePath(const URL& url, const String& path, SandboxExtension::Handle&& handleForWriting, CompletionHandler<void(bool)>&& completionHandler) >-{ >- auto extension = SandboxExtension::create(WTFMove(handleForWriting)); >- if (!extension) { >- completionHandler(false); >- return; >- } >- >- extension->consume(); >- NetworkBlobRegistry::singleton().writeBlobToFilePath(url, path, [extension = WTFMove(extension), completionHandler = WTFMove(completionHandler)] (bool success) mutable { >- extension->revoke(); >- completionHandler(success); >- }); >-} >- > #if ENABLE(RESOURCE_LOAD_STATISTICS) > void NetworkProcess::dumpResourceLoadStatistics(PAL::SessionID sessionID, CompletionHandler<void(String)>&& completionHandler) > { >Index: Source/WebKit/NetworkProcess/NetworkProcess.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.h (revision 240683) >+++ Source/WebKit/NetworkProcess/NetworkProcess.h (working copy) >@@ -365,8 +365,6 @@ private: > void syncAllCookies(); > void didSyncAllCookies(); > >- void writeBlobToFilePath(const URL&, const String& path, SandboxExtension::Handle&&, CompletionHandler<void(bool)>&&); >- > #if USE(SOUP) > void setIgnoreTLSErrors(bool); > void userPreferredLanguagesChanged(const Vector<String>&); >Index: Source/WebKit/NetworkProcess/NetworkProcess.messages.in >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkProcess.messages.in (revision 240680) >+++ Source/WebKit/NetworkProcess/NetworkProcess.messages.in (working copy) >@@ -80,8 +80,6 @@ messages -> NetworkProcess LegacyReceive > CancelPrepareToSuspend() > ProcessDidResume() > >- WriteBlobToFilePath(URL blobURL, String path, WebKit::SandboxExtension::Handle handle) -> (bool success) Async >- > PreconnectTo(URL url, enum:bool WebCore::StoredCredentialsPolicy storedCredentialsPolicy); > > #if ENABLE(RESOURCE_LOAD_STATISTICS) >Index: Source/WebKit/UIProcess/WebPageProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.cpp (revision 240683) >+++ Source/WebKit/UIProcess/WebPageProxy.cpp (working copy) >@@ -8456,16 +8456,6 @@ Ref<API::Attachment> WebPageProxy::ensur > > #endif // ENABLE(ATTACHMENT_ELEMENT) > >-void WebPageProxy::writeBlobToFilePath(const URL& url, const String& path, Function<void(bool success)>&& callback) >-{ >- if (!isValid()) { >- callback(false); >- return; >- } >- >- m_process->processPool().ensureNetworkProcess().writeBlobToFilePath(url, path, WTFMove(callback)); >-} >- > #if ENABLE(APPLICATION_MANIFEST) > void WebPageProxy::getApplicationManifest(Function<void(const Optional<WebCore::ApplicationManifest>&, CallbackBase::Error)>&& callbackFunction) > { >Index: Source/WebKit/UIProcess/WebPageProxy.h >=================================================================== >--- Source/WebKit/UIProcess/WebPageProxy.h (revision 240680) >+++ Source/WebKit/UIProcess/WebPageProxy.h (working copy) >@@ -1403,8 +1403,6 @@ public: > void getApplicationManifest(Function<void(const Optional<WebCore::ApplicationManifest>&, CallbackBase::Error)>&&); > #endif > >- void writeBlobToFilePath(const URL& blobURL, const String& path, Function<void(bool success)>&&); >- > WebPreferencesStore preferencesStore() const; > > void setDefersLoadingForTesting(bool); >Index: Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (revision 240680) >+++ Source/WebKit/UIProcess/Cocoa/WebViewImpl.mm (working copy) >@@ -4093,9 +4093,7 @@ void WebViewImpl::writeToURLForFilePromi > return; > } > >- m_page->writeBlobToFilePath(blobURL, fileURL.path, [protectedCompletionHandler = makeBlockPtr(completionHandler)] (bool success) { >- protectedCompletionHandler(success ? nil : webKitUnknownError()); >- }); >+ completionHandler(webKitUnknownError()); > } > > NSDragOperation WebViewImpl::dragSourceOperationMask(NSDraggingSession *, NSDraggingContext context) >Index: Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (revision 240683) >+++ Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp (working copy) >@@ -947,18 +947,6 @@ void NetworkProcessProxy::sendProcessDid > send(Messages::NetworkProcess::ProcessDidResume(), 0); > } > >-void NetworkProcessProxy::writeBlobToFilePath(const URL& url, const String& path, CompletionHandler<void(bool)>&& completionHandler) >-{ >- if (!canSendMessage()) { >- completionHandler(false); >- return; >- } >- >- SandboxExtension::Handle handleForWriting; >- SandboxExtension::createHandle(path, SandboxExtension::Type::ReadWrite, handleForWriting); >- sendWithAsyncReply(Messages::NetworkProcess::WriteBlobToFilePath(url, path, handleForWriting), WTFMove(completionHandler)); >-} >- > void NetworkProcessProxy::processReadyToSuspend() > { > m_throttler.processReadyToSuspend(); >Index: Source/WebKit/UIProcess/Network/NetworkProcessProxy.h >=================================================================== >--- Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (revision 240683) >+++ Source/WebKit/UIProcess/Network/NetworkProcessProxy.h (working copy) >@@ -130,8 +130,6 @@ public: > void resetCacheMaxAgeCapForPrevalentResources(PAL::SessionID, CompletionHandler<void()>&&); > #endif > >- void writeBlobToFilePath(const URL&, const String& path, CompletionHandler<void(bool)>&&); >- > void processReadyToSuspend(); > > void sendProcessDidTransitionToForeground(); >Index: Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm >=================================================================== >--- Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (revision 240680) >+++ Source/WebKit/UIProcess/ios/WKContentViewInteraction.mm (working copy) >@@ -5786,14 +5786,6 @@ - (void)_prepareToDragPromisedAttachment > callback(destinationURL, nil); > else > callback(nil, fileWrapperError); >- } else if (!info.blobURL.isEmpty()) { >- RELEASE_LOG(DragAndDrop, "Drag session: %p delivering promised blob at path: %@", session.get(), destinationURL.path); >- strongSelf->_page->writeBlobToFilePath(info.blobURL, destinationURL.path, [protectedURL = retainPtr(destinationURL), protectedCallback = makeBlockPtr(callback)] (bool success) { >- if (success) >- protectedCallback(protectedURL.get(), nil); >- else >- protectedCallback(nil, [NSError errorWithDomain:WKErrorDomain code:WKErrorUnknown userInfo:nil]); >- }); > } else > callback(nil, [NSError errorWithDomain:WKErrorDomain code:WKErrorWebViewInvalidated userInfo:nil]); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 193990
:
360509
| 360517