WebKit Bugzilla
Attachment 362444 Details for
Bug 194835
: Reduce use of LegacySync IPC message type
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194835-20190219152755.patch (text/plain), 41.53 KB, created by
Alex Christensen
on 2019-02-19 15:27:56 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Alex Christensen
Created:
2019-02-19 15:27:56 PST
Size:
41.53 KB
patch
obsolete
>Index: Source/WebKit/ChangeLog >=================================================================== >--- Source/WebKit/ChangeLog (revision 241782) >+++ Source/WebKit/ChangeLog (working copy) >@@ -1,3 +1,48 @@ >+2019-02-19 Alex Christensen <achristensen@webkit.org> >+ >+ Reduce use of LegacySync IPC message type >+ https://bugs.webkit.org/show_bug.cgi?id=194835 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ * NetworkProcess/NetworkConnectionToWebProcess.cpp: >+ (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): >+ (WebKit::NetworkConnectionToWebProcess::cookiesEnabled): >+ (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue): >+ (WebKit::NetworkConnectionToWebProcess::getRawCookies): >+ (WebKit::NetworkConnectionToWebProcess::blobSize): >+ (WebKit::NetworkConnectionToWebProcess::establishIDBConnectionToServer): >+ (WebKit::NetworkConnectionToWebProcess::establishSWServerConnection): >+ * NetworkProcess/NetworkConnectionToWebProcess.h: >+ (WebKit::NetworkConnectionToWebProcess::getNetworkLoadInformationRequest): >+ (WebKit::NetworkConnectionToWebProcess::getNetworkLoadInformationResponse): >+ (WebKit::NetworkConnectionToWebProcess::getNetworkLoadIntermediateInformation): >+ (WebKit::NetworkConnectionToWebProcess::takeNetworkLoadInformationMetrics): >+ * NetworkProcess/NetworkConnectionToWebProcess.messages.in: >+ * UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp: >+ (WebKit::UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints): >+ (WebKit::UserMediaCaptureManagerProxy::capabilities): >+ * UIProcess/Cocoa/UserMediaCaptureManagerProxy.h: >+ * UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in: >+ * UIProcess/Plugins/PluginProcessProxy.h: >+ * UIProcess/Plugins/PluginProcessProxy.messages.in: >+ * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: >+ (WebKit::PluginProcessProxy::launchProcess): >+ (WebKit::PluginProcessProxy::launchApplicationAtURL): >+ (WebKit::PluginProcessProxy::openURL): >+ (WebKit::PluginProcessProxy::openFile): >+ * UIProcess/WebFullScreenManagerProxy.cpp: >+ (WebKit::WebFullScreenManagerProxy::supportsFullScreen): >+ * UIProcess/WebFullScreenManagerProxy.h: >+ * UIProcess/WebFullScreenManagerProxy.messages.in: >+ * WebProcess/WebProcess.cpp: >+ (WebKit::WebProcess::fetchWebsiteData): >+ (WebKit::WebProcess::deleteWebsiteData): >+ (WebKit::WebProcess::deleteWebsiteDataForOrigins): >+ (WebKit::WebProcess::processWillSuspendImminently): >+ * WebProcess/WebProcess.h: >+ * WebProcess/WebProcess.messages.in: >+ > 2019-02-19 Antti Koivisto <antti@apple.com> > > Pass rootContentsLayer to Mac remote layer tree >Index: Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (revision 241753) >+++ Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.cpp (working copy) >@@ -451,16 +451,17 @@ void NetworkConnectionToWebProcess::conv > loader->convertToDownload(downloadID, request, response); > } > >-void NetworkConnectionToWebProcess::cookiesForDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies, String& cookieString, bool& secureCookiesAccessed) >+void NetworkConnectionToWebProcess::cookiesForDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&& completionHandler) > { > auto& networkStorageSession = storageSession(networkProcess(), sessionID); >- std::tie(cookieString, secureCookiesAccessed) = networkStorageSession.cookiesForDOM(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); >+ auto result = networkStorageSession.cookiesForDOM(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); > #if ENABLE(RESOURCE_LOAD_STATISTICS) && !RELEASE_LOG_DISABLED > if (auto session = networkProcess().networkSession(sessionID)) { > if (session->shouldLogCookieInformation()) > NetworkResourceLoader::logCookieInformation(*this, "NetworkConnectionToWebProcess::cookiesForDOM", reinterpret_cast<const void*>(this), networkStorageSession, firstParty, sameSiteInfo, url, emptyString(), frameID, pageID, WTF::nullopt); > } > #endif >+ completionHandler(result.first, result.second); > } > > void NetworkConnectionToWebProcess::setCookiesFromDOM(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, const String& cookieString) >@@ -475,19 +476,22 @@ void NetworkConnectionToWebProcess::setC > #endif > } > >-void NetworkConnectionToWebProcess::cookiesEnabled(PAL::SessionID sessionID, bool& result) >+void NetworkConnectionToWebProcess::cookiesEnabled(PAL::SessionID sessionID, CompletionHandler<void(bool)>&& completionHandler) > { >- result = storageSession(networkProcess(), sessionID).cookiesEnabled(); >+ completionHandler(storageSession(networkProcess(), sessionID).cookiesEnabled()); > } > >-void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies, String& cookieString, bool& secureCookiesAccessed) >+void NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, IncludeSecureCookies includeSecureCookies, CompletionHandler<void(String, bool)>&& completionHandler) > { >- std::tie(cookieString, secureCookiesAccessed) = storageSession(networkProcess(), sessionID).cookieRequestHeaderFieldValue(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); >+ auto result = storageSession(networkProcess(), sessionID).cookieRequestHeaderFieldValue(firstParty, sameSiteInfo, url, frameID, pageID, includeSecureCookies); >+ completionHandler(result.first, result.second); > } > >-void NetworkConnectionToWebProcess::getRawCookies(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Vector<Cookie>& result) >+void NetworkConnectionToWebProcess::getRawCookies(PAL::SessionID sessionID, const URL& firstParty, const SameSiteInfo& sameSiteInfo, const URL& url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&& completionHandler) > { >+ Vector<WebCore::Cookie> result; > storageSession(networkProcess(), sessionID).getRawCookies(firstParty, sameSiteInfo, url, frameID, pageID, result); >+ completionHandler(WTFMove(result)); > } > > void NetworkConnectionToWebProcess::deleteCookie(PAL::SessionID sessionID, const URL& url, const String& cookieName) >@@ -525,9 +529,9 @@ void NetworkConnectionToWebProcess::unre > m_networkProcess->networkBlobRegistry().unregisterBlobURL(*this, url); > } > >-void NetworkConnectionToWebProcess::blobSize(const URL& url, uint64_t& resultSize) >+void NetworkConnectionToWebProcess::blobSize(const URL& url, CompletionHandler<void(uint64_t)>&& completionHandler) > { >- resultSize = m_networkProcess->networkBlobRegistry().blobSize(*this, url); >+ completionHandler(m_networkProcess->networkBlobRegistry().blobSize(*this, url)); > } > > void NetworkConnectionToWebProcess::writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&&)>&& completionHandler) >@@ -761,13 +765,14 @@ static uint64_t generateIDBConnectionToS > return ++identifier; > } > >-void NetworkConnectionToWebProcess::establishIDBConnectionToServer(PAL::SessionID sessionID, uint64_t& serverConnectionIdentifier) >+void NetworkConnectionToWebProcess::establishIDBConnectionToServer(PAL::SessionID sessionID, CompletionHandler<void(uint64_t)>&& completionHandler) > { >- serverConnectionIdentifier = generateIDBConnectionToServerIdentifier(); >+ uint64_t serverConnectionIdentifier = generateIDBConnectionToServerIdentifier(); > LOG(IndexedDB, "NetworkConnectionToWebProcess::establishIDBConnectionToServer - %" PRIu64, serverConnectionIdentifier); > ASSERT(!m_webIDBConnections.contains(serverConnectionIdentifier)); > > m_webIDBConnections.set(serverConnectionIdentifier, WebIDBConnectionToClient::create(m_networkProcess, m_connection.get(), serverConnectionIdentifier, sessionID)); >+ completionHandler(serverConnectionIdentifier); > } > #endif > >@@ -781,17 +786,18 @@ void NetworkConnectionToWebProcess::unre > } > } > >-void NetworkConnectionToWebProcess::establishSWServerConnection(PAL::SessionID sessionID, SWServerConnectionIdentifier& serverConnectionIdentifier) >+void NetworkConnectionToWebProcess::establishSWServerConnection(PAL::SessionID sessionID, CompletionHandler<void(WebCore::SWServerConnectionIdentifier&&)>&& completionHandler) > { > auto& server = m_networkProcess->swServerForSession(sessionID); > auto connection = std::make_unique<WebSWServerConnection>(m_networkProcess, server, m_connection.get(), sessionID); > >- serverConnectionIdentifier = connection->identifier(); >+ SWServerConnectionIdentifier serverConnectionIdentifier = connection->identifier(); > LOG(ServiceWorker, "NetworkConnectionToWebProcess::establishSWServerConnection - %s", serverConnectionIdentifier.loggingString().utf8().data()); > > ASSERT(!m_swConnections.contains(serverConnectionIdentifier)); > m_swConnections.add(serverConnectionIdentifier, makeWeakPtr(*connection)); > server.addConnection(WTFMove(connection)); >+ completionHandler(WTFMove(serverConnectionIdentifier)); > } > #endif > >Index: Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (revision 241753) >+++ Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.h (working copy) >@@ -80,24 +80,24 @@ public: > void cleanupForSuspension(Function<void()>&&); > void endSuspension(); > >- void getNetworkLoadInformationRequest(ResourceLoadIdentifier identifier, WebCore::ResourceRequest& request) >+ void getNetworkLoadInformationRequest(ResourceLoadIdentifier identifier, CompletionHandler<void(const WebCore::ResourceRequest&)>&& completionHandler) > { >- request = m_networkLoadInformationByID.get(identifier).request; >+ completionHandler(m_networkLoadInformationByID.get(identifier).request); > } > >- void getNetworkLoadInformationResponse(ResourceLoadIdentifier identifier, WebCore::ResourceResponse& response) >+ void getNetworkLoadInformationResponse(ResourceLoadIdentifier identifier, CompletionHandler<void(const WebCore::ResourceResponse&)>&& completionHandler) > { >- response = m_networkLoadInformationByID.get(identifier).response; >+ completionHandler(m_networkLoadInformationByID.get(identifier).response); > } > >- void getNetworkLoadIntermediateInformation(ResourceLoadIdentifier identifier, Vector<WebCore::NetworkTransactionInformation>& information) >+ void getNetworkLoadIntermediateInformation(ResourceLoadIdentifier identifier, CompletionHandler<void(const Vector<WebCore::NetworkTransactionInformation>&)>&& completionHandler) > { >- information = m_networkLoadInformationByID.get(identifier).transactions; >+ completionHandler(m_networkLoadInformationByID.get(identifier).transactions); > } > >- void takeNetworkLoadInformationMetrics(ResourceLoadIdentifier identifier, WebCore::NetworkLoadMetrics& metrics) >+ void takeNetworkLoadInformationMetrics(ResourceLoadIdentifier identifier, CompletionHandler<void(const WebCore::NetworkLoadMetrics&)>&& completionHandler) > { >- metrics = m_networkLoadInformationByID.take(identifier).metrics; >+ completionHandler(m_networkLoadInformationByID.take(identifier).metrics); > } > > void addNetworkLoadInformation(ResourceLoadIdentifier identifier, WebCore::NetworkLoadInformation&& information) >@@ -153,11 +153,11 @@ private: > void startDownload(PAL::SessionID, DownloadID, const WebCore::ResourceRequest&, const String& suggestedName = { }); > void convertMainResourceLoadToDownload(PAL::SessionID, uint64_t mainResourceLoadIdentifier, DownloadID, const WebCore::ResourceRequest&, const WebCore::ResourceResponse&); > >- void cookiesForDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, WebCore::IncludeSecureCookies, String& cookieString, bool& secureCookiesAccessed); >+ void cookiesForDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&); > void setCookiesFromDOM(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, const String&); >- void cookiesEnabled(PAL::SessionID, bool& result); >- void cookieRequestHeaderFieldValue(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, WebCore::IncludeSecureCookies, String& cookieString, bool& secureCookiesAccessed); >- void getRawCookies(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, Vector<WebCore::Cookie>&); >+ void cookiesEnabled(PAL::SessionID, CompletionHandler<void(bool)>&&); >+ void cookieRequestHeaderFieldValue(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, WebCore::IncludeSecureCookies, CompletionHandler<void(String cookieString, bool secureCookiesAccessed)>&&); >+ void getRawCookies(PAL::SessionID, const URL& firstParty, const WebCore::SameSiteInfo&, const URL&, Optional<uint64_t> frameID, Optional<uint64_t> pageID, CompletionHandler<void(Vector<WebCore::Cookie>&&)>&&); > void deleteCookie(PAL::SessionID, const URL&, const String& cookieName); > > void registerFileBlobURL(const URL&, const String& path, SandboxExtension::Handle&&, const String& contentType); >@@ -165,7 +165,7 @@ private: > void registerBlobURLFromURL(const URL&, const URL& srcURL, bool shouldBypassConnectionCheck); > void registerBlobURLOptionallyFileBacked(const URL&, const URL& srcURL, const String& fileBackedPath, const String& contentType); > void registerBlobURLForSlice(const URL&, const URL& srcURL, int64_t start, int64_t end); >- void blobSize(const URL&, uint64_t& resultSize); >+ void blobSize(const URL&, CompletionHandler<void(uint64_t)>&&); > void unregisterBlobURL(const URL&); > void writeBlobsToTemporaryFiles(const Vector<String>& blobURLs, CompletionHandler<void(Vector<String>&&)>&&); > >@@ -178,11 +178,11 @@ private: > > #if ENABLE(INDEXED_DATABASE) > // Messages handlers (Modern IDB). >- void establishIDBConnectionToServer(PAL::SessionID, uint64_t& serverConnectionIdentifier); >+ void establishIDBConnectionToServer(PAL::SessionID, CompletionHandler<void(uint64_t serverConnectionIdentifier)>&&); > #endif > > #if ENABLE(SERVICE_WORKER) >- void establishSWServerConnection(PAL::SessionID, WebCore::SWServerConnectionIdentifier&); >+ void establishSWServerConnection(PAL::SessionID, CompletionHandler<void(WebCore::SWServerConnectionIdentifier&&)>&&); > void unregisterSWConnections(); > #endif > >Index: Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in >=================================================================== >--- Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (revision 241753) >+++ Source/WebKit/NetworkProcess/NetworkConnectionToWebProcess.messages.in (working copy) >@@ -33,11 +33,11 @@ messages -> NetworkConnectionToWebProces > StartDownload(PAL::SessionID sessionID, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, String suggestedName) > ConvertMainResourceLoadToDownload(PAL::SessionID sessionID, uint64_t mainResourceLoadIdentifier, WebKit::DownloadID downloadID, WebCore::ResourceRequest request, WebCore::ResourceResponse response) > >- CookiesForDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) LegacySync >+ CookiesForDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Delayed > SetCookiesFromDOM(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, String cookieString) >- CookiesEnabled(PAL::SessionID sessionID) -> (bool enabled) LegacySync >- CookieRequestHeaderFieldValue(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) LegacySync >- GetRawCookies(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID) -> (Vector<WebCore::Cookie> cookies) LegacySync >+ CookiesEnabled(PAL::SessionID sessionID) -> (bool enabled) Delayed >+ CookieRequestHeaderFieldValue(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID, enum:bool WebCore::IncludeSecureCookies includeSecureCookies) -> (String cookieString, bool didAccessSecureCookies) Delayed >+ GetRawCookies(PAL::SessionID sessionID, URL firstParty, struct WebCore::SameSiteInfo sameSiteInfo, URL url, Optional<uint64_t> frameID, Optional<uint64_t> pageID) -> (Vector<WebCore::Cookie> cookies) Delayed > DeleteCookie(PAL::SessionID sessionID, URL url, String cookieName) > > RegisterFileBlobURL(URL url, String path, WebKit::SandboxExtension::Handle extensionHandle, String contentType) >@@ -46,7 +46,7 @@ messages -> NetworkConnectionToWebProces > RegisterBlobURLOptionallyFileBacked(URL url, URL srcURL, String fileBackedPath, String contentType) > RegisterBlobURLForSlice(URL url, URL srcURL, int64_t start, int64_t end) > UnregisterBlobURL(URL url) >- BlobSize(URL url) -> (uint64_t resultSize) LegacySync >+ BlobSize(URL url) -> (uint64_t resultSize) Delayed > WriteBlobsToTemporaryFiles(Vector<String> blobURLs) -> (Vector<String> fileNames) Async > > SetCaptureExtraNetworkLoadMetricsEnabled(bool enabled) >@@ -71,16 +71,16 @@ messages -> NetworkConnectionToWebProces > RemoveOriginAccessWhitelistEntry(String sourceOrigin, String destinationProtocol, String destinationHost, bool allowDestinationSubdomains); > ResetOriginAccessWhitelists(); > >- GetNetworkLoadInformationRequest(uint64_t resourceLoadIdentifier) -> (WebCore::ResourceRequest request) LegacySync >- GetNetworkLoadInformationResponse(uint64_t resourceLoadIdentifier) -> (WebCore::ResourceResponse response) LegacySync >- GetNetworkLoadIntermediateInformation(uint64_t resourceLoadIdentifier) -> (Vector<WebCore::NetworkTransactionInformation> transactions) LegacySync >- TakeNetworkLoadInformationMetrics(uint64_t resourceLoadIdentifier) -> (WebCore::NetworkLoadMetrics networkMetrics) LegacySync >+ GetNetworkLoadInformationRequest(uint64_t resourceLoadIdentifier) -> (WebCore::ResourceRequest request) Delayed >+ GetNetworkLoadInformationResponse(uint64_t resourceLoadIdentifier) -> (WebCore::ResourceResponse response) Delayed >+ GetNetworkLoadIntermediateInformation(uint64_t resourceLoadIdentifier) -> (Vector<WebCore::NetworkTransactionInformation> transactions) Delayed >+ TakeNetworkLoadInformationMetrics(uint64_t resourceLoadIdentifier) -> (WebCore::NetworkLoadMetrics networkMetrics) Delayed > > #if ENABLE(INDEXED_DATABASE) >- EstablishIDBConnectionToServer(PAL::SessionID sessionID) -> (uint64_t serverConnectionIdentifier) LegacySync >+ EstablishIDBConnectionToServer(PAL::SessionID sessionID) -> (uint64_t serverConnectionIdentifier) Delayed > #endif > > #if ENABLE(SERVICE_WORKER) >- EstablishSWServerConnection(PAL::SessionID sessionID) -> (WebCore::SWServerConnectionIdentifier serverConnectionIdentifier) LegacySync >+ EstablishSWServerConnection(PAL::SessionID sessionID) -> (WebCore::SWServerConnectionIdentifier serverConnectionIdentifier) Delayed > #endif > } >Index: Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp (revision 241753) >+++ Source/WebKit/UIProcess/WebFullScreenManagerProxy.cpp (working copy) >@@ -97,12 +97,12 @@ void WebFullScreenManagerProxy::requestE > m_page.process().send(Messages::WebFullScreenManager::RequestExitFullScreen(), m_page.pageID()); > } > >-void WebFullScreenManagerProxy::supportsFullScreen(bool withKeyboard, bool& supports) >+void WebFullScreenManagerProxy::supportsFullScreen(bool withKeyboard, CompletionHandler<void(bool)>&& completionHandler) > { > #if PLATFORM(IOS_FAMILY) >- supports = !withKeyboard; >+ completionHandler(!withKeyboard); > #else >- supports = true; >+ completionHandler(true); > #endif > } > >Index: Source/WebKit/UIProcess/WebFullScreenManagerProxy.h >=================================================================== >--- Source/WebKit/UIProcess/WebFullScreenManagerProxy.h (revision 241753) >+++ Source/WebKit/UIProcess/WebFullScreenManagerProxy.h (working copy) >@@ -77,7 +77,7 @@ public: > void setFullscreenControlsHidden(bool); > > private: >- void supportsFullScreen(bool withKeyboard, bool&); >+ void supportsFullScreen(bool withKeyboard, CompletionHandler<void(bool)>&&); > void enterFullScreen(); > void exitFullScreen(); > void beganEnterFullScreen(const WebCore::IntRect& initialFrame, const WebCore::IntRect& finalFrame); >Index: Source/WebKit/UIProcess/WebFullScreenManagerProxy.messages.in >=================================================================== >--- Source/WebKit/UIProcess/WebFullScreenManagerProxy.messages.in (revision 241753) >+++ Source/WebKit/UIProcess/WebFullScreenManagerProxy.messages.in (working copy) >@@ -22,7 +22,7 @@ > > #if ENABLE(FULLSCREEN_API) > messages -> WebFullScreenManagerProxy { >- SupportsFullScreen(bool withKeyboard) -> (bool supportsFullScreen) LegacySync >+ SupportsFullScreen(bool withKeyboard) -> (bool supportsFullScreen) Delayed > EnterFullScreen() > ExitFullScreen() > BeganEnterFullScreen(WebCore::IntRect initialRect, WebCore::IntRect finalRect) >Index: Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp (revision 241753) >+++ Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.cpp (working copy) >@@ -137,7 +137,7 @@ UserMediaCaptureManagerProxy::~UserMedia > m_process.removeMessageReceiver(Messages::UserMediaCaptureManagerProxy::messageReceiverName()); > } > >-void UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints(uint64_t id, const CaptureDevice& device, String&& hashSalt, const MediaConstraints& constraints, bool& succeeded, String& invalidConstraints, WebCore::RealtimeMediaSourceSettings& settings) >+void UserMediaCaptureManagerProxy::createMediaSourceForCaptureDeviceWithConstraints(uint64_t id, const CaptureDevice& device, String&& hashSalt, const MediaConstraints& constraints, CompletionHandler<void(bool succeeded, String invalidConstraints, WebCore::RealtimeMediaSourceSettings&&)>&& completionHandler) > { > CaptureSourceOrError sourceOrError; > switch (device.type()) { >@@ -156,7 +156,9 @@ void UserMediaCaptureManagerProxy::creat > break; > } > >- succeeded = !!sourceOrError; >+ bool succeeded = !!sourceOrError; >+ String invalidConstraints; >+ WebCore::RealtimeMediaSourceSettings settings; > if (sourceOrError) { > auto source = sourceOrError.source(); > source->setIsRemote(true); >@@ -165,6 +167,7 @@ void UserMediaCaptureManagerProxy::creat > m_proxies.add(id, std::make_unique<SourceProxy>(id, *this, WTFMove(source))); > } else > invalidConstraints = WTFMove(sourceOrError.errorMessage); >+ completionHandler(succeeded, invalidConstraints, WTFMove(settings)); > } > > void UserMediaCaptureManagerProxy::startProducingData(uint64_t id) >@@ -186,11 +189,13 @@ void UserMediaCaptureManagerProxy::end(u > m_proxies.remove(id); > } > >-void UserMediaCaptureManagerProxy::capabilities(uint64_t id, WebCore::RealtimeMediaSourceCapabilities& capabilities) >+void UserMediaCaptureManagerProxy::capabilities(uint64_t id, CompletionHandler<void(WebCore::RealtimeMediaSourceCapabilities&&)>&& completionHandler) > { >+ WebCore::RealtimeMediaSourceCapabilities capabilities; > auto iter = m_proxies.find(id); > if (iter != m_proxies.end()) > capabilities = iter->value->source().capabilities(); >+ completionHandler(WTFMove(capabilities)); > } > > void UserMediaCaptureManagerProxy::setMuted(uint64_t id, bool muted) >Index: Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.h >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.h (revision 241753) >+++ Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.h (working copy) >@@ -51,11 +51,11 @@ private: > void didReceiveMessage(IPC::Connection&, IPC::Decoder&) final; > void didReceiveSyncMessage(IPC::Connection&, IPC::Decoder&, std::unique_ptr<IPC::Encoder>&) final; > >- void createMediaSourceForCaptureDeviceWithConstraints(uint64_t id, const WebCore::CaptureDevice& deviceID, String&&, const WebCore::MediaConstraints&, bool& succeeded, String& invalidConstraints, WebCore::RealtimeMediaSourceSettings&); >+ void createMediaSourceForCaptureDeviceWithConstraints(uint64_t id, const WebCore::CaptureDevice& deviceID, String&&, const WebCore::MediaConstraints&, CompletionHandler<void(bool succeeded, String invalidConstraints, WebCore::RealtimeMediaSourceSettings&&)>&&); > void startProducingData(uint64_t); > void stopProducingData(uint64_t); > void end(uint64_t); >- void capabilities(uint64_t, WebCore::RealtimeMediaSourceCapabilities&); >+ void capabilities(uint64_t, CompletionHandler<void(WebCore::RealtimeMediaSourceCapabilities&&)>&&); > void setMuted(uint64_t, bool); > void applyConstraints(uint64_t, const WebCore::MediaConstraints&); > >Index: Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in >=================================================================== >--- Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in (revision 241753) >+++ Source/WebKit/UIProcess/Cocoa/UserMediaCaptureManagerProxy.messages.in (working copy) >@@ -24,11 +24,11 @@ > #if ENABLE(MEDIA_STREAM) > > messages -> UserMediaCaptureManagerProxy { >-CreateMediaSourceForCaptureDeviceWithConstraints(uint64_t id, WebCore::CaptureDevice device, String hashSalt, struct WebCore::MediaConstraints constraints) -> (bool success, String invalidConstraints, WebCore::RealtimeMediaSourceSettings settings) LegacySync >+ CreateMediaSourceForCaptureDeviceWithConstraints(uint64_t id, WebCore::CaptureDevice device, String hashSalt, struct WebCore::MediaConstraints constraints) -> (bool success, String invalidConstraints, WebCore::RealtimeMediaSourceSettings settings) Delayed > StartProducingData(uint64_t id) > StopProducingData(uint64_t id) > End(uint64_t id) >- Capabilities(uint64_t id) -> (WebCore::RealtimeMediaSourceCapabilities capabilities) LegacySync >+ Capabilities(uint64_t id) -> (WebCore::RealtimeMediaSourceCapabilities capabilities) Delayed > SetMuted(uint64_t id, bool muted) > ApplyConstraints(uint64_t id, struct WebCore::MediaConstraints constraints) > } >Index: Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h >=================================================================== >--- Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h (revision 241753) >+++ Source/WebKit/UIProcess/Plugins/PluginProcessProxy.h (working copy) >@@ -130,10 +130,10 @@ private: > void endModal(); > > void applicationDidBecomeActive(); >- void launchProcess(const String& launchPath, const Vector<String>& arguments, bool& result); >- void launchApplicationAtURL(const String& urlString, const Vector<String>& arguments, bool& result); >- void openURL(const String& url, bool& result, int32_t& status, String& launchedURLString); >- void openFile(const String& fullPath, bool& result); >+ void launchProcess(const String& launchPath, const Vector<String>& arguments, CompletionHandler<void(bool)>&&); >+ void launchApplicationAtURL(const String& urlString, const Vector<String>& arguments, CompletionHandler<void(bool)>&&); >+ void openURL(const String& url, CompletionHandler<void(bool result, int32_t status, String launchedURLString)>&&); >+ void openFile(const String& fullPath, CompletionHandler<void(bool)>&&); > #endif > > void platformInitializePluginProcess(PluginProcessCreationParameters& parameters); >Index: Source/WebKit/UIProcess/Plugins/PluginProcessProxy.messages.in >=================================================================== >--- Source/WebKit/UIProcess/Plugins/PluginProcessProxy.messages.in (revision 241753) >+++ Source/WebKit/UIProcess/Plugins/PluginProcessProxy.messages.in (working copy) >@@ -34,16 +34,16 @@ messages -> PluginProcessProxy { > SetFullscreenWindowIsShowing(bool fullscreenWindowIsShowing) > > # Returns true if the UI process launched the process. >- LaunchProcess(String launchPath, Vector<String> arguments) -> (bool result) LegacySync >+ LaunchProcess(String launchPath, Vector<String> arguments) -> (bool result) Delayed > > # Returns true if the UI process launched the application. >- LaunchApplicationAtURL(String url, Vector<String> arguments) -> (bool result) LegacySync >+ LaunchApplicationAtURL(String url, Vector<String> arguments) -> (bool result) Delayed > > # Returns true if the UI process did open the URL. >- OpenURL(String urlString) -> (bool result, int32_t status, String launchedURLString) LegacySync >+ OpenURL(String urlString) -> (bool result, int32_t status, String launchedURLString) Delayed > > # Returns true if the UI process did open the file. >- OpenFile(String fullPath) -> (bool result) LegacySync >+ OpenFile(String fullPath) -> (bool result) Delayed > #endif > } > >Index: Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm >=================================================================== >--- Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm (revision 241753) >+++ Source/WebKit/UIProcess/Plugins/mac/PluginProcessProxyMac.mm (working copy) >@@ -248,20 +248,17 @@ static bool shouldLaunchProcess(const Pl > return false; > } > >-void PluginProcessProxy::launchProcess(const String& launchPath, const Vector<String>& arguments, bool& result) >+void PluginProcessProxy::launchProcess(const String& launchPath, const Vector<String>& arguments, CompletionHandler<void(bool)>&& completionHandler) > { >- if (!shouldLaunchProcess(m_pluginProcessAttributes, launchPath, arguments)) { >- result = false; >- return; >- } >- >- result = true; >+ if (!shouldLaunchProcess(m_pluginProcessAttributes, launchPath, arguments)) >+ return completionHandler(false); > > RetainPtr<NSMutableArray> argumentsArray = adoptNS([[NSMutableArray alloc] initWithCapacity:arguments.size()]); > for (size_t i = 0; i < arguments.size(); ++i) > [argumentsArray addObject:(NSString *)arguments[i]]; > > [NSTask launchedTaskWithLaunchPath:launchPath arguments:argumentsArray.get()]; >+ completionHandler(true); > } > > static bool isJavaUpdaterURL(const PluginProcessAttributes& pluginProcessAttributes, const String& urlString) >@@ -289,14 +286,10 @@ static bool shouldLaunchApplicationAtURL > return false; > } > >-void PluginProcessProxy::launchApplicationAtURL(const String& urlString, const Vector<String>& arguments, bool& result) >+void PluginProcessProxy::launchApplicationAtURL(const String& urlString, const Vector<String>& arguments, CompletionHandler<void(bool)>&& completionHandler) > { >- if (!shouldLaunchApplicationAtURL(m_pluginProcessAttributes, urlString)) { >- result = false; >- return; >- } >- >- result = true; >+ if (!shouldLaunchApplicationAtURL(m_pluginProcessAttributes, urlString)) >+ return completionHandler(false); > > RetainPtr<NSMutableArray> argumentsArray = adoptNS([[NSMutableArray alloc] initWithCapacity:arguments.size()]); > for (size_t i = 0; i < arguments.size(); ++i) >@@ -304,6 +297,7 @@ void PluginProcessProxy::launchApplicati > > NSDictionary *configuration = [NSDictionary dictionaryWithObject:argumentsArray.get() forKey:NSWorkspaceLaunchConfigurationArguments]; > [[NSWorkspace sharedWorkspace] launchApplicationAtURL:[NSURL URLWithString:urlString] options:NSWorkspaceLaunchAsync configuration:configuration error:nullptr]; >+ completionHandler(true); > } > > static bool isSilverlightPreferencesURL(const PluginProcessAttributes& pluginProcessAttributes, const String& urlString) >@@ -321,21 +315,20 @@ static bool shouldOpenURL(const PluginPr > return false; > } > >-void PluginProcessProxy::openURL(const String& urlString, bool& result, int32_t& status, String& launchedURLString) >+void PluginProcessProxy::openURL(const String& urlString, CompletionHandler<void(bool result, int32_t status, String launchedURLString)>&& completionHandler) > { >- if (!shouldOpenURL(m_pluginProcessAttributes, urlString)) { >- result = false; >- return; >- } >+ if (!shouldOpenURL(m_pluginProcessAttributes, urlString)) >+ return completionHandler(false, 0, { }); > >- result = true; > CFURLRef launchedURL; >- status = LSOpenCFURLRef(URL({ }, urlString).createCFURL().get(), &launchedURL); >+ uint32_t status = LSOpenCFURLRef(URL({ }, urlString).createCFURL().get(), &launchedURL); > >+ String launchedURLString; > if (launchedURL) { > launchedURLString = URL(launchedURL).string(); > CFRelease(launchedURL); > } >+ completionHandler(true, status, launchedURLString); > } > > static bool shouldOpenFile(const PluginProcessAttributes& pluginProcessAttributes, const String& fullPath) >@@ -348,15 +341,13 @@ static bool shouldOpenFile(const PluginP > return false; > } > >-void PluginProcessProxy::openFile(const String& fullPath, bool& result) >+void PluginProcessProxy::openFile(const String& fullPath, CompletionHandler<void(bool)>&& completionHandler) > { >- if (!shouldOpenFile(m_pluginProcessAttributes, fullPath)) { >- result = false; >- return; >- } >+ if (!shouldOpenFile(m_pluginProcessAttributes, fullPath)) >+ return completionHandler(false); > >- result = true; > [[NSWorkspace sharedWorkspace] openFile:fullPath]; >+ completionHandler(true); > } > > int pluginProcessLatencyQOS() >Index: Source/WebKit/WebProcess/WebProcess.cpp >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.cpp (revision 241753) >+++ Source/WebKit/WebProcess/WebProcess.cpp (working copy) >@@ -1330,15 +1330,17 @@ void WebProcess::releasePageCache() > PageCache::singleton().pruneToSizeNow(0, PruningReason::MemoryPressure); > } > >-void WebProcess::fetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, WebsiteData& websiteData) >+void WebProcess::fetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, CompletionHandler<void(WebsiteData&&)>&& completionHandler) > { >+ WebsiteData websiteData; > if (websiteDataTypes.contains(WebsiteDataType::MemoryCache)) { > for (auto& origin : MemoryCache::singleton().originsWithCache(sessionID)) > websiteData.entries.append(WebsiteData::Entry { origin->data(), WebsiteDataType::MemoryCache, 0 }); > } >+ completionHandler(WTFMove(websiteData)); > } > >-void WebProcess::deleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, WallTime modifiedSince) >+void WebProcess::deleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, WallTime modifiedSince, CompletionHandler<void()>&& completionHandler) > { > UNUSED_PARAM(modifiedSince); > >@@ -1348,9 +1350,10 @@ void WebProcess::deleteWebsiteData(PAL:: > > CrossOriginPreflightResultCache::singleton().clear(); > } >+ completionHandler(); > } > >-void WebProcess::deleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, const Vector<WebCore::SecurityOriginData>& originDatas) >+void WebProcess::deleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet<WebsiteDataType> websiteDataTypes, const Vector<WebCore::SecurityOriginData>& originDatas, CompletionHandler<void()>&& completionHandler) > { > if (websiteDataTypes.contains(WebsiteDataType::MemoryCache)) { > HashSet<RefPtr<SecurityOrigin>> origins; >@@ -1359,6 +1362,7 @@ void WebProcess::deleteWebsiteDataForOri > > MemoryCache::singleton().removeResourcesWithOrigins(sessionID, origins); > } >+ completionHandler(); > } > > void WebProcess::setHiddenPageDOMTimerThrottlingIncreaseLimit(int milliseconds) >@@ -1445,20 +1449,20 @@ void WebProcess::actualPrepareToSuspend( > }); > } > >-void WebProcess::processWillSuspendImminently(bool& handled) >+void WebProcess::processWillSuspendImminently(CompletionHandler<void(bool)>&& completionHandler) > { > if (parentProcessConnection()->inSendSync()) { > // Avoid reentrency bugs such as rdar://problem/21605505 by just bailing > // if we get an incoming ProcessWillSuspendImminently message when waiting for a > // reply to a sync message. > // FIXME: ProcessWillSuspendImminently should not be a sync message. >- return; >+ return completionHandler(false); > } > > RELEASE_LOG(ProcessSuspension, "%p - WebProcess::processWillSuspendImminently()", this); > DatabaseTracker::singleton().closeAllDatabases(CurrentQueryBehavior::Interrupt); > actualPrepareToSuspend(ShouldAcknowledgeWhenReadyToSuspend::No); >- handled = true; >+ completionHandler(true); > } > > void WebProcess::prepareToSuspend() >Index: Source/WebKit/WebProcess/WebProcess.h >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.h (revision 241753) >+++ Source/WebKit/WebProcess/WebProcess.h (working copy) >@@ -196,7 +196,7 @@ public: > > void setHiddenPageDOMTimerThrottlingIncreaseLimit(int milliseconds); > >- void processWillSuspendImminently(bool& handled); >+ void processWillSuspendImminently(CompletionHandler<void(bool)>&&); > void prepareToSuspend(); > void cancelPrepareToSuspend(); > void processDidResume(); >@@ -327,9 +327,9 @@ private: > > void releasePageCache(); > >- void fetchWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, WebsiteData&); >- void deleteWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, WallTime modifiedSince); >- void deleteWebsiteDataForOrigins(PAL::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>& origins); >+ void fetchWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, CompletionHandler<void(WebsiteData&&)>&&); >+ void deleteWebsiteData(PAL::SessionID, OptionSet<WebsiteDataType>, WallTime modifiedSince, CompletionHandler<void()>&&); >+ void deleteWebsiteDataForOrigins(PAL::SessionID, OptionSet<WebsiteDataType>, const Vector<WebCore::SecurityOriginData>& origins, CompletionHandler<void()>&&); > > void setMemoryCacheDisabled(bool); > >Index: Source/WebKit/WebProcess/WebProcess.messages.in >=================================================================== >--- Source/WebKit/WebProcess/WebProcess.messages.in (revision 241753) >+++ Source/WebKit/WebProcess/WebProcess.messages.in (working copy) >@@ -77,9 +77,9 @@ messages -> WebProcess LegacyReceiver { > > ReleasePageCache() > >- FetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes) -> (struct WebKit::WebsiteData websiteData) LegacySync >- DeleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, WallTime modifiedSince) -> () LegacySync >- DeleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, Vector<WebCore::SecurityOriginData> origins) -> () LegacySync >+ FetchWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes) -> (struct WebKit::WebsiteData websiteData) Delayed >+ DeleteWebsiteData(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, WallTime modifiedSince) -> () Delayed >+ DeleteWebsiteDataForOrigins(PAL::SessionID sessionID, OptionSet<WebKit::WebsiteDataType> websiteDataTypes, Vector<WebCore::SecurityOriginData> origins) -> () Delayed > > SetHiddenPageDOMTimerThrottlingIncreaseLimit(int milliseconds) > #if PLATFORM(COCOA) >@@ -95,7 +95,7 @@ messages -> WebProcess LegacyReceiver { > EnsureAutomationSessionProxy(String sessionIdentifier) > DestroyAutomationSessionProxy() > >- ProcessWillSuspendImminently() -> (bool handled) LegacySync >+ ProcessWillSuspendImminently() -> (bool handled) Delayed > PrepareToSuspend() > CancelPrepareToSuspend() > ProcessDidResume()
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
Flags:
darin
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194835
: 362444