Changeset 240350 in webkit
- Timestamp:
- Jan 23, 2019 11:18:59 AM (5 years ago)
- Location:
- trunk/Source/WebKit
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit/ChangeLog
r240349 r240350 1 2019-01-23 Michael Catanzaro <mcatanzaro@igalia.com> 2 3 Minor improvements to NetworkProcess 4 https://bugs.webkit.org/show_bug.cgi?id=193708 5 6 Reviewed by Alex Christensen. 7 8 * NetworkProcess/NetworkProcess.cpp: 9 (WebKit::NetworkProcess::switchToNewTestingSession): Fix a spelling error. 10 (WebKit::NetworkProcess::ensureSession): Add useful assertion. 11 (WebKit::NetworkProcess::defaultStorageSession const): Split into platform functions. 12 (WebKit::NetworkProcess::destroySession): Add useful assertion. 13 * NetworkProcess/NetworkProcess.h: 14 * NetworkProcess/cocoa/NetworkProcessCocoa.mm: 15 (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): 16 * NetworkProcess/curl/NetworkProcessCurl.cpp: 17 (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): 18 * NetworkProcess/soup/NetworkProcessSoup.cpp: 19 (WebKit::NetworkProcess::platformCreateDefaultStorageSession const): 20 1 21 2019-01-23 Daniel Bates <dabates@apple.com> 2 22 -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.cpp
r240317 r240350 476 476 { 477 477 #if PLATFORM(COCOA) 478 // Session name should be short enough for shared memory region name to be under the limit, ot ehrwise sandbox rules won't work (see <rdar://problem/13642852>).478 // Session name should be short enough for shared memory region name to be under the limit, otherwise sandbox rules won't work (see <rdar://problem/13642852>). 479 479 String sessionName = String::format("WebKit Test-%u", static_cast<uint32_t>(getCurrentProcessID())); 480 480 … … 500 500 #endif 501 501 { 502 ASSERT(sessionID != PAL::SessionID::defaultSessionID()); 503 502 504 auto addResult = m_networkStorageSessions.add(sessionID, nullptr); 503 505 if (!addResult.isNewEntry) … … 533 535 WebCore::NetworkStorageSession& NetworkProcess::defaultStorageSession() const 534 536 { 535 if (m_defaultNetworkStorageSession) 536 return *m_defaultNetworkStorageSession; 537 538 #if PLATFORM(COCOA) 539 m_defaultNetworkStorageSession = std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID()); 540 #elif USE(SOUP) 541 m_defaultNetworkStorageSession = std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), std::make_unique<SoupNetworkSession>(PAL::SessionID::defaultSessionID())); 542 #elif USE(CURL) 543 m_defaultNetworkStorageSession = std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), CurlContext::singleton()); 544 #else 545 #error Implement me 546 #endif 547 537 if (!m_defaultNetworkStorageSession) 538 m_defaultNetworkStorageSession = platformCreateDefaultStorageSession(); 548 539 return *m_defaultNetworkStorageSession; 549 540 } … … 568 559 void NetworkProcess::destroySession(const PAL::SessionID& sessionID) 569 560 { 561 ASSERT(sessionID != PAL::SessionID::defaultSessionID()); 562 570 563 if (auto session = m_networkSessions.take(sessionID)) 571 564 session->get().invalidateAndCancel(); -
trunk/Source/WebKit/NetworkProcess/NetworkProcess.h
r240292 r240350 290 290 291 291 void platformInitializeNetworkProcess(const NetworkProcessCreationParameters&); 292 std::unique_ptr<WebCore::NetworkStorageSession> platformCreateDefaultStorageSession() const; 292 293 293 294 void terminate() override; -
trunk/Source/WebKit/NetworkProcess/cocoa/NetworkProcessCocoa.mm
r240292 r240350 131 131 } 132 132 133 std::unique_ptr<WebCore::NetworkStorageSession> NetworkProcess::platformCreateDefaultStorageSession() const 134 { 135 return std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID()); 136 } 137 133 138 RetainPtr<CFDataRef> NetworkProcess::sourceApplicationAuditData() const 134 139 { -
trunk/Source/WebKit/NetworkProcess/curl/NetworkProcessCurl.cpp
r239671 r240350 38 38 void NetworkProcess::platformInitializeNetworkProcess(const NetworkProcessCreationParameters&) 39 39 { 40 } 41 42 std::unique_ptr<WebCore::NetworkStorageSession> NetworkProcess::platformCreateDefaultStorageSession() const 43 { 44 return std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), CurlContext::singleton()); 40 45 } 41 46 -
trunk/Source/WebKit/NetworkProcess/soup/NetworkProcessSoup.cpp
r240340 r240350 133 133 } 134 134 135 std::unique_ptr<WebCore::NetworkStorageSession> NetworkProcess::platformCreateDefaultStorageSession() const 136 { 137 return std::make_unique<WebCore::NetworkStorageSession>(PAL::SessionID::defaultSessionID(), std::make_unique<SoupNetworkSession>(PAL::SessionID::defaultSessionID())); 138 } 139 135 140 void NetworkProcess::setIgnoreTLSErrors(bool ignoreTLSErrors) 136 141 {
Note: See TracChangeset
for help on using the changeset viewer.