Changeset 250457 in webkit
- Timestamp:
- Sep 27, 2019 1:55:59 PM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r250456 r250457 1 2019-09-27 Alex Christensen <achristensen@webkit.org> 2 3 Move legacy custom protocol registration from process pool to NetworkProcessProxy 4 https://bugs.webkit.org/show_bug.cgi?id=202315 5 6 Reviewed by Tim Horton. 7 8 Legacy custom protocol registration is a global thing, which is why it's legacy and we're trying to get rid of it. 9 In the meantime, we don't want it to be in the set of things the NetworkProcess depends on the WebProcessPool for, which should be an empty set. 10 11 * UIProcess/WebProcessPool.cpp: 12 (WebKit::WebProcessPool::ensureNetworkProcess): 13 (WebKit::WebProcessPool::registerGlobalURLSchemeAsHavingCustomProtocolHandlers): 14 (WebKit::WebProcessPool::unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers): 15 (WebKit::WebProcessPool::registerSchemeForCustomProtocol): Deleted. 16 (WebKit::WebProcessPool::unregisterSchemeForCustomProtocol): Deleted. 17 * UIProcess/WebProcessPool.h: 18 1 19 2019-09-27 Alex Christensen <achristensen@webkit.org> 2 20 -
trunk/Source/WebKit/UIProcess/API/glib/WebKitWebContext.cpp
r250421 r250457 1139 1139 auto addResult = context->priv->uriSchemeHandlers.set(String::fromUTF8(scheme), handler.get()); 1140 1140 if (addResult.isNewEntry) 1141 context->priv->processPool->registerSchemeForCustomProtocol(String::fromUTF8(scheme));1141 WebKit::WebProcessPool::registerGlobalURLSchemeAsHavingCustomProtocolHandlers(String::fromUTF8(scheme)); 1142 1142 } 1143 1143 -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.cpp
r250413 r250457 32 32 #include "DownloadProxyMessages.h" 33 33 #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER) 34 #include "LegacyCustomProtocolManagerMessages.h" 34 35 #include "LegacyCustomProtocolManagerProxyMessages.h" 35 36 #endif … … 1258 1259 } 1259 1260 1261 void NetworkProcessProxy::registerSchemeForLegacyCustomProtocol(const String& scheme) 1262 { 1263 #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER) 1264 send(Messages::LegacyCustomProtocolManager::RegisterScheme(scheme), 0); 1265 #else 1266 UNUSED_PARAM(scheme); 1267 #endif 1268 } 1269 1270 void NetworkProcessProxy::unregisterSchemeForLegacyCustomProtocol(const String& scheme) 1271 { 1272 #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER) 1273 send(Messages::LegacyCustomProtocolManager::UnregisterScheme(scheme), 0); 1274 #else 1275 UNUSED_PARAM(scheme); 1276 #endif 1277 } 1278 1260 1279 void NetworkProcessProxy::takeUploadAssertion() 1261 1280 { -
trunk/Source/WebKit/UIProcess/Network/NetworkProcessProxy.h
r250413 r250457 192 192 void sendProcessWillSuspendImminentlyForTesting(); 193 193 194 void registerSchemeForLegacyCustomProtocol(const String&); 195 void unregisterSchemeForLegacyCustomProtocol(const String&); 196 194 197 private: 195 198 // AuxiliaryProcessProxy -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r250456 r250457 103 103 #include <wtf/text/StringConcatenateNumbers.h> 104 104 105 #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER)106 #include "LegacyCustomProtocolManagerMessages.h"107 #endif108 109 105 #if ENABLE(SERVICE_CONTROLS) 110 106 #include "ServicesController.h" … … 494 490 495 491 for (auto& scheme : globalURLSchemesWithCustomProtocolHandlers()) 496 parameters.urlSchemesRegisteredForCustomProtocols.append(scheme);497 498 for (auto& scheme : m_urlSchemesRegisteredForCustomProtocols)499 492 parameters.urlSchemesRegisteredForCustomProtocols.append(scheme); 500 493 … … 1518 1511 1519 1512 globalURLSchemesWithCustomProtocolHandlers().add(urlScheme); 1520 for (auto* processPool : allProcessPools()) 1521 processPool->registerSchemeForCustomProtocol(urlScheme); 1513 for (auto* processPool : allProcessPools()) { 1514 if (auto* networkProcess = processPool->networkProcess()) 1515 networkProcess->registerSchemeForLegacyCustomProtocol(urlScheme); 1516 } 1522 1517 } 1523 1518 … … 1528 1523 1529 1524 globalURLSchemesWithCustomProtocolHandlers().remove(urlScheme); 1530 for (auto* processPool : allProcessPools()) 1531 processPool->unregisterSchemeForCustomProtocol(urlScheme); 1525 for (auto* processPool : allProcessPools()) { 1526 if (auto* networkProcess = processPool->networkProcess()) 1527 networkProcess->unregisterSchemeForLegacyCustomProtocol(urlScheme); 1528 } 1532 1529 } 1533 1530 … … 1969 1966 { 1970 1967 m_plugInAutoStartProvider.setAutoStartOriginsFilteringOutEntriesAddedAfterTime(dictionary, time); 1971 }1972 1973 void WebProcessPool::registerSchemeForCustomProtocol(const String& scheme)1974 {1975 #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER)1976 if (!globalURLSchemesWithCustomProtocolHandlers().contains(scheme))1977 m_urlSchemesRegisteredForCustomProtocols.add(scheme);1978 sendToNetworkingProcess(Messages::LegacyCustomProtocolManager::RegisterScheme(scheme));1979 #endif1980 }1981 1982 void WebProcessPool::unregisterSchemeForCustomProtocol(const String& scheme)1983 {1984 #if ENABLE(LEGACY_CUSTOM_PROTOCOL_MANAGER)1985 m_urlSchemesRegisteredForCustomProtocols.remove(scheme);1986 sendToNetworkingProcess(Messages::LegacyCustomProtocolManager::UnregisterScheme(scheme));1987 #endif1988 1968 } 1989 1969 -
trunk/Source/WebKit/UIProcess/WebProcessPool.h
r250426 r250457 411 411 void resetHSTSHostsAddedAfterDate(double startDateIntervalSince1970); 412 412 413 void registerSchemeForCustomProtocol(const String&);414 void unregisterSchemeForCustomProtocol(const String&);415 416 413 static void registerGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&); 417 414 static void unregisterGlobalURLSchemeAsHavingCustomProtocolHandlers(const String&); … … 678 675 WebCore::SoupNetworkProxySettings m_networkProxySettings; 679 676 #endif 680 HashSet<String, ASCIICaseInsensitiveHash> m_urlSchemesRegisteredForCustomProtocols;681 677 682 678 #if PLATFORM(MAC)
Note: See TracChangeset
for help on using the changeset viewer.