Changeset 239727 in webkit
- Timestamp:
- Jan 8, 2019, 10:08:55 AM (7 years ago)
- Location:
- trunk/Source
- Files:
-
- 28 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r239726 r239727 1 2019-01-08 Alex Christensen <achristensen@webkit.org> 2 3 Stop using NetworkStorageSession in WebProcess 4 https://bugs.webkit.org/show_bug.cgi?id=193236 5 6 Reviewed by Don Olmstead. 7 8 No change in behavior. Some code was only used for ResourceHandle, which isn't used in modern WebKit, 9 and for cookies, which are handled in the NetworkProcess in modern WebKit. 10 11 * loader/CookieJar.cpp: 12 (WebCore::storageSession): 13 * loader/EmptyClients.cpp: 14 * platform/network/NetworkingContext.h: 15 * platform/network/mac/ResourceHandleMac.mm: 16 (WebCore::ResourceHandle::createNSURLConnection): 17 (WebCore::ResourceHandle::start): 18 (WebCore::ResourceHandle::platformLoadResourceSynchronously): 19 (WebCore::ResourceHandle::willSendRequest): 20 (WebCore::ResourceHandle::tryHandlePasswordBasedAuthentication): 21 (WebCore::ResourceHandle::receivedCredential): 22 1 23 2019-01-08 Chris Dumez <cdumez@apple.com> 2 24 -
trunk/Source/WebCore/loader/CookieJar.cpp
r239427 r239727 55 55 { 56 56 NetworkingContext* context = networkingContext(document); 57 return context ? context->storageSession() : NetworkStorageSession::defaultStorageSession();57 return context ? *context->storageSession() : NetworkStorageSession::defaultStorageSession(); 58 58 } 59 59 -
trunk/Source/WebCore/loader/EmptyClients.cpp
r239584 r239727 288 288 289 289 bool shouldClearReferrerOnHTTPSToHTTPRedirect() const { return true; } 290 NetworkStorageSession & storageSession() const final { returnNetworkStorageSession::defaultStorageSession(); }290 NetworkStorageSession* storageSession() const final { return &NetworkStorageSession::defaultStorageSession(); } 291 291 292 292 #if PLATFORM(COCOA) -
trunk/Source/WebCore/platform/network/NetworkingContext.h
r223728 r239727 59 59 virtual String sourceApplicationIdentifier() const { return emptyString(); } 60 60 61 virtual NetworkStorageSession &storageSession() const = 0;61 virtual NetworkStorageSession* storageSession() const = 0; 62 62 63 63 #if PLATFORM(WIN) -
trunk/Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp
r238298 r239727 150 150 // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication, 151 151 // try and reuse the credential preemptively, as allowed by RFC 2617. 152 d->m_initialCredential = d->m_context->storageSession() .credentialStorage().get(partition, firstRequest().url());152 d->m_initialCredential = d->m_context->storageSession()->credentialStorage().get(partition, firstRequest().url()); 153 153 } else { 154 154 // If there is already a protection space known for the URL, update stored credentials before sending a request. 155 155 // This makes it possible to implement logout by sending an XMLHttpRequest with known incorrect credentials, and aborting it immediately 156 156 // (so that an authentication dialog doesn't pop up). 157 d->m_context->storageSession() .credentialStorage().set(partition, Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url());157 d->m_context->storageSession()->credentialStorage().set(partition, Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url()); 158 158 } 159 159 } … … 262 262 return false; 263 263 264 d->m_storageSession = d->m_context->storageSession() .platformSession();264 d->m_storageSession = d->m_context->storageSession()->platformSession(); 265 265 266 266 bool shouldUseCredentialStorage = !client() || client()->shouldUseCredentialStorage(this); … … 308 308 // URL didn't include credentials of its own. 309 309 if (d->m_user.isEmpty() && d->m_pass.isEmpty() && !redirectResponse.isNull()) { 310 Credential credential = d->m_context->storageSession() .credentialStorage().get(partition, request.url());310 Credential credential = d->m_context->storageSession()->credentialStorage().get(partition, request.url()); 311 311 if (!credential.isEmpty()) { 312 312 d->m_initialCredential = credential; … … 383 383 if (challenge.failureResponse().httpStatusCode() == 401) 384 384 urlToStore = challenge.failureResponse().url(); 385 d->m_context->storageSession() .credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore);385 d->m_context->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), urlToStore); 386 386 387 387 CFURLConnectionUseCredential(d->m_connection.get(), cfCredential.get(), challenge.cfURLAuthChallengeRef()); … … 397 397 // There is a race condition here, since a different credential might have already been stored by another ResourceHandle, 398 398 // but the observable effect should be very minor, if any. 399 d->m_context->storageSession() .credentialStorage().remove(partition, challenge.protectionSpace());399 d->m_context->storageSession()->credentialStorage().remove(partition, challenge.protectionSpace()); 400 400 } 401 401 402 402 if (!challenge.previousFailureCount()) { 403 Credential credential = d->m_context->storageSession() .credentialStorage().get(partition, challenge.protectionSpace());403 Credential credential = d->m_context->storageSession()->credentialStorage().get(partition, challenge.protectionSpace()); 404 404 if (!credential.isEmpty() && credential != d->m_initialCredential) { 405 405 ASSERT(credential.persistence() == CredentialPersistenceNone); 406 406 if (challenge.failureResponse().httpStatusCode() == 401) { 407 407 // Store the credential back, possibly adding it as a default for this directory. 408 d->m_context->storageSession() .credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());408 d->m_context->storageSession()->credentialStorage().set(partition, credential, challenge.protectionSpace(), challenge.failureResponse().url()); 409 409 } 410 410 #if PLATFORM(COCOA) … … 456 456 urlToStore = challenge.failureResponse().url(); 457 457 458 d->m_context->storageSession() .credentialStorage().set(firstRequest().cachePartition(), webCredential, challenge.protectionSpace(), urlToStore);458 d->m_context->storageSession()->credentialStorage().set(firstRequest().cachePartition(), webCredential, challenge.protectionSpace(), urlToStore); 459 459 460 460 if (d->m_connection) { … … 572 572 RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(context, request, &client, defersLoading, shouldContentSniff, shouldContentEncodingSniff)); 573 573 574 handle->d->m_storageSession = context->storageSession() .platformSession();574 handle->d->m_storageSession = context->storageSession()->platformSession(); 575 575 576 576 if (handle->d->m_scheduledFailureType != NoFailure) { -
trunk/Source/WebCore/platform/network/mac/ResourceHandleMac.mm
r238891 r239727 158 158 // <rdar://problem/7174050> - For URLs that match the paths of those previously challenged for HTTP Basic authentication, 159 159 // try and reuse the credential preemptively, as allowed by RFC 2617. 160 d->m_initialCredential = d->m_context->storageSession() .credentialStorage().get(firstRequest().cachePartition(), firstRequest().url());160 d->m_initialCredential = d->m_context->storageSession()->credentialStorage().get(firstRequest().cachePartition(), firstRequest().url()); 161 161 } else { 162 162 // If there is already a protection space known for the URL, update stored credentials before sending a request. 163 163 // This makes it possible to implement logout by sending an XMLHttpRequest with known incorrect credentials, and aborting it immediately 164 164 // (so that an authentication dialog doesn't pop up). 165 d->m_context->storageSession() .credentialStorage().set(firstRequest().cachePartition(), Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url());165 d->m_context->storageSession()->credentialStorage().set(firstRequest().cachePartition(), Credential(d->m_user, d->m_pass, CredentialPersistenceNone), firstRequest().url()); 166 166 } 167 167 } … … 241 241 return false; 242 242 243 d->m_storageSession = d->m_context->storageSession() .platformSession();243 d->m_storageSession = d->m_context->storageSession()->platformSession(); 244 244 245 245 // FIXME: Do not use the sync version of shouldUseCredentialStorage when the client returns true from usesAsyncCallbacks. … … 368 368 RefPtr<ResourceHandle> handle = adoptRef(new ResourceHandle(context, request, &client, defersLoading, shouldContentSniff, shouldContentEncodingSniff)); 369 369 370 handle->d->m_storageSession = context->storageSession() .platformSession();370 handle->d->m_storageSession = context->storageSession()->platformSession(); 371 371 372 372 if (context && handle->d->m_scheduledFailureType != NoFailure) { … … 450 450 // URL didn't include credentials of its own. 451 451 if (d->m_user.isEmpty() && d->m_pass.isEmpty() && !redirectResponse.isNull()) { 452 Credential credential = d->m_context->storageSession() .credentialStorage().get(request.cachePartition(), request.url());452 Credential credential = d->m_context->storageSession()->credentialStorage().get(request.cachePartition(), request.url()); 453 453 if (!credential.isEmpty()) { 454 454 d->m_initialCredential = credential; … … 541 541 // There is a race condition here, since a different credential might have already been stored by another ResourceHandle, 542 542 // but the observable effect should be very minor, if any. 543 d->m_context->storageSession() .credentialStorage().remove(d->m_partition, challenge.protectionSpace());543 d->m_context->storageSession()->credentialStorage().remove(d->m_partition, challenge.protectionSpace()); 544 544 } 545 545 546 546 if (!challenge.previousFailureCount()) { 547 Credential credential = d->m_context->storageSession() .credentialStorage().get(d->m_partition, challenge.protectionSpace());547 Credential credential = d->m_context->storageSession()->credentialStorage().get(d->m_partition, challenge.protectionSpace()); 548 548 if (!credential.isEmpty() && credential != d->m_initialCredential) { 549 549 ASSERT(credential.persistence() == CredentialPersistenceNone); 550 550 if (challenge.failureResponse().httpStatusCode() == 401) { 551 551 // Store the credential back, possibly adding it as a default for this directory. 552 d->m_context->storageSession() .credentialStorage().set(d->m_partition, credential, challenge.protectionSpace(), challenge.failureResponse().url());552 d->m_context->storageSession()->credentialStorage().set(d->m_partition, credential, challenge.protectionSpace(), challenge.failureResponse().url()); 553 553 } 554 554 [challenge.sender() useCredential:credential.nsCredential() forAuthenticationChallenge:mac(challenge)]; … … 592 592 if (challenge.failureResponse().httpStatusCode() == 401) 593 593 urlToStore = challenge.failureResponse().url(); 594 d->m_context->storageSession() .credentialStorage().set(d->m_partition, webCredential, ProtectionSpace([d->m_currentMacChallenge protectionSpace]), urlToStore);594 d->m_context->storageSession()->credentialStorage().set(d->m_partition, webCredential, ProtectionSpace([d->m_currentMacChallenge protectionSpace]), urlToStore); 595 595 [[d->m_currentMacChallenge sender] useCredential:webCredential.nsCredential() forAuthenticationChallenge:d->m_currentMacChallenge]; 596 596 } else -
trunk/Source/WebKit/ChangeLog
r239725 r239727 1 2019-01-08 Alex Christensen <achristensen@webkit.org> 2 3 Stop using NetworkStorageSession in WebProcess 4 https://bugs.webkit.org/show_bug.cgi?id=193236 5 6 Reviewed by Don Olmstead. 7 8 * Shared/WebProcessCreationParameters.cpp: 9 (WebKit::WebProcessCreationParameters::encode const): 10 (WebKit::WebProcessCreationParameters::decode): 11 * Shared/WebProcessCreationParameters.h: 12 * Shared/WebsitePoliciesData.cpp: 13 (WebKit::WebsitePoliciesData::applyToDocumentLoader): 14 * UIProcess/WebProcessPool.cpp: 15 (WebKit::WebProcessPool::setAnyPageGroupMightHavePrivateBrowsingEnabled): 16 (WebKit::WebProcessPool::tryTakePrewarmedProcess): 17 (WebKit::WebProcessPool::initializeNewWebProcess): 18 (WebKit::WebProcessPool::pageBeginUsingWebsiteDataStore): 19 (WebKit::WebProcessPool::pageEndUsingWebsiteDataStore): 20 (WebKit::WebProcessPool::processForNavigationInternal): 21 * WebProcess/InjectedBundle/InjectedBundle.cpp: 22 (WebKit::InjectedBundle::setPrivateBrowsingEnabled): 23 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: 24 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: 25 (WebKit::WebFrameNetworkingContext::ensureWebsiteDataStoreSession): Deleted. 26 (WebKit::WebFrameNetworkingContext::storageSession const): Deleted. 27 * WebProcess/WebPage/WebPage.cpp: 28 (WebKit::WebPage::setSessionID): 29 * WebProcess/WebProcess.cpp: 30 (WebKit::WebProcess::initializeWebProcess): 31 (WebKit::WebProcess::fetchWebsiteData): 32 (WebKit::WebProcess::addWebsiteDataStore): Deleted. 33 (WebKit::WebProcess::destroySession): Deleted. 34 * WebProcess/WebProcess.h: 35 * WebProcess/WebProcess.messages.in: 36 1 37 2019-01-08 Alex Christensen <achristensen@webkit.org> 2 38 -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.cpp
r239427 r239727 73 73 encoder << shouldCaptureDisplayInUIProcess; 74 74 #endif 75 encoder << shouldUseTestingNetworkSession;76 75 encoder << urlSchemesRegisteredAsEmptyDocument; 77 76 encoder << urlSchemesRegisteredAsSecure; … … 268 267 return false; 269 268 #endif 270 if (!decoder.decode(parameters.shouldUseTestingNetworkSession))271 return false;272 269 if (!decoder.decode(parameters.urlSchemesRegisteredAsEmptyDocument)) 273 270 return false; -
trunk/Source/WebKit/Shared/WebProcessCreationParameters.h
r238909 r239727 125 125 double defaultRequestTimeoutInterval { INT_MAX }; 126 126 127 bool shouldUseTestingNetworkSession { false };128 127 bool shouldAlwaysUseComplexTextCodePath { false }; 129 128 bool shouldEnableMemoryPressureReliefLogging { false }; -
trunk/Source/WebKit/Shared/WebsitePoliciesData.cpp
r239639 r239727 162 162 if (websitePolicies.websiteDataStoreParameters) { 163 163 if (auto* frame = documentLoader.frame()) { 164 if (auto* page = frame->page()) { 165 auto sessionID = websitePolicies.websiteDataStoreParameters->networkSessionParameters.sessionID; 166 WebProcess::singleton().addWebsiteDataStore(WTFMove(*websitePolicies.websiteDataStoreParameters)); 167 page->setSessionID(sessionID); 168 } 164 if (auto* page = frame->page()) 165 page->setSessionID(websitePolicies.websiteDataStoreParameters->networkSessionParameters.sessionID); 169 166 } 170 167 } -
trunk/Source/WebKit/UIProcess/WebProcessPool.cpp
r239632 r239727 690 690 if (privateBrowsingEnabled) { 691 691 sendToNetworkingProcess(Messages::NetworkProcess::AddWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters())); 692 sendToAllProcesses(Messages::WebProcess::AddWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters()));693 692 } else { 694 693 networkProcess()->removeSession(PAL::SessionID::legacyPrivateSessionID()); 695 sendToAllProcesses(Messages::WebProcess::DestroySession(PAL::SessionID::legacyPrivateSessionID()));696 694 } 697 695 } … … 766 764 ASSERT(m_prewarmedProcess->isPrewarmed()); 767 765 m_prewarmedProcess->markIsNoLongerInPrewarmedPool(); 768 if (&m_prewarmedProcess->websiteDataStore() != &websiteDataStore)769 m_prewarmedProcess->send(Messages::WebProcess::AddWebsiteDataStore(websiteDataStore.parameters()), 0);770 766 771 767 return std::exchange(m_prewarmedProcess, nullptr); … … 854 850 SandboxExtension::createHandleWithoutResolvingPath(parameters.javaScriptConfigurationDirectory, SandboxExtension::Type::ReadWrite, parameters.javaScriptConfigurationDirectoryExtensionHandle); 855 851 } 856 857 parameters.shouldUseTestingNetworkSession = m_shouldUseTestingNetworkSession;858 852 859 853 parameters.cacheModel = cacheModel(); … … 943 937 #endif 944 938 945 if (WebPreferences::anyPagesAreUsingPrivateBrowsing())946 process.send(Messages::WebProcess::AddWebsiteDataStore(WebsiteDataStoreParameters::legacyPrivateSessionParameters()), 0);947 948 939 if (m_automationSession) 949 940 process.send(Messages::WebProcess::EnsureAutomationSessionProxy(m_automationSession->sessionIdentifier()), 0); … … 1189 1180 if (m_networkProcess) 1190 1181 m_networkProcess->addSession(makeRef(page.websiteDataStore())); 1191 page.process().send(Messages::WebProcess::AddWebsiteDataStore(WebsiteDataStoreParameters::privateSessionParameters(sessionID)), 0);1192 1182 page.websiteDataStore().clearPendingCookies(); 1193 1183 } else if (sessionID != PAL::SessionID::defaultSessionID()) { 1194 1184 if (m_networkProcess) 1195 1185 m_networkProcess->addSession(makeRef(page.websiteDataStore())); 1196 page.process().send(Messages::WebProcess::AddWebsiteDataStore(page.websiteDataStore().parameters()), 0);1197 1186 page.websiteDataStore().clearPendingCookies(); 1198 1187 } … … 1225 1214 if (networkProcess()) 1226 1215 networkProcess()->removeSession(sessionID); 1227 page.process().send(Messages::WebProcess::DestroySession(sessionID), 0);1228 1216 } 1229 1217 } … … 2239 2227 m_suspendedPages.remove(it); 2240 2228 2241 if (&process->websiteDataStore() != &page.websiteDataStore())2242 process->send(Messages::WebProcess::AddWebsiteDataStore(page.websiteDataStore().parameters()), 0);2243 2244 2229 return completionHandler(WTFMove(process), nullptr, reason); 2245 2230 } -
trunk/Source/WebKit/WebProcess/InjectedBundle/InjectedBundle.cpp
r239098 r239727 358 358 if (enabled) { 359 359 WebProcess::singleton().ensureLegacyPrivateBrowsingSessionInNetworkProcess(); 360 WebFrameNetworkingContext::ensureWebsiteDataStoreSession(WebsiteDataStoreParameters::legacyPrivateSessionParameters());361 360 } else 362 361 SessionTracker::destroySession(PAL::SessionID::legacyPrivateSessionID()); -
trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.cpp
r228373 r239727 57 57 } 58 58 59 NetworkStorageSession& WebFrameNetworkingContext::storageSession() const60 {61 if (frame()) {62 if (auto* storageSession = NetworkStorageSession::storageSession(frame()->page()->sessionID()))63 return *storageSession;64 }65 return NetworkStorageSession::defaultStorageSession();66 }67 68 59 WebFrameLoaderClient* WebFrameNetworkingContext::webFrameLoaderClient() const 69 60 { -
trunk/Source/WebKit/WebProcess/WebCoreSupport/curl/WebFrameNetworkingContext.h
r239366 r239727 54 54 WebFrameNetworkingContext(WebFrame*); 55 55 56 WebCore::NetworkStorageSession & storageSession() const override;56 WebCore::NetworkStorageSession* storageSession() const override { return nullptr; } 57 57 }; 58 58 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h
r229480 r239727 57 57 String sourceApplicationIdentifier() const override; 58 58 WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override; 59 WebCore::NetworkStorageSession & storageSession() const override;59 WebCore::NetworkStorageSession* storageSession() const override { return nullptr; } 60 60 }; 61 61 -
trunk/Source/WebKit/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
r239683 r239727 44 44 using namespace WebCore; 45 45 46 void WebFrameNetworkingContext::ensureWebsiteDataStoreSession(WebsiteDataStoreParameters&& parameters)47 {48 ASSERT(!hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));49 auto sessionID = parameters.networkSessionParameters.sessionID;50 if (NetworkStorageSession::storageSession(sessionID))51 return;52 53 String base = WebProcess::singleton().uiProcessBundleIdentifier();54 if (base.isNull())55 base = [[NSBundle mainBundle] bundleIdentifier];56 57 NetworkStorageSession::ensureSession(sessionID, base + '.' + String::number(sessionID.sessionID()));58 }59 60 46 bool WebFrameNetworkingContext::localFileContentSniffingEnabled() const 61 47 { … … 85 71 } 86 72 87 NetworkStorageSession& WebFrameNetworkingContext::storageSession() const88 {89 ASSERT(RunLoop::isMain());90 ASSERT(!hasProcessPrivilege(ProcessPrivilege::CanAccessRawCookies));91 if (frame()) {92 if (auto* storageSession = WebCore::NetworkStorageSession::storageSession(frame()->page()->sessionID()))93 return *storageSession;94 // Some requests may still be coming shortly after WebProcess was told to destroy its session.95 LOG_ERROR("WEB Invalid session ID. Please file a bug unless you just disabled private browsing, in which case it's an expected race.");96 }97 return NetworkStorageSession::defaultStorageSession();98 }99 100 73 WebFrameLoaderClient* WebFrameNetworkingContext::webFrameLoaderClient() const 101 74 { -
trunk/Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
r239680 r239727 59 59 } 60 60 61 NetworkStorageSession& WebFrameNetworkingContext::storageSession() const62 {63 if (frame()) {64 if (auto* storageSession = NetworkStorageSession::storageSession(frame()->page()->sessionID()))65 return *storageSession;66 }67 return NetworkStorageSession::defaultStorageSession();68 }69 70 61 WebFrameLoaderClient* WebFrameNetworkingContext::webFrameLoaderClient() const 71 62 { -
trunk/Source/WebKit/WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h
r223791 r239727 52 52 WebFrameNetworkingContext(WebFrame*); 53 53 54 WebCore::NetworkStorageSession & storageSession() const override;54 WebCore::NetworkStorageSession* storageSession() const override { return nullptr; } 55 55 }; 56 56 -
trunk/Source/WebKit/WebProcess/WebPage/WebPage.cpp
r239694 r239727 3044 3044 void WebPage::setSessionID(PAL::SessionID sessionID) 3045 3045 { 3046 if (sessionID.isEphemeral())3047 WebProcess::singleton().addWebsiteDataStore(WebsiteDataStoreParameters::privateSessionParameters(sessionID));3048 3046 m_page->setSessionID(sessionID); 3049 3047 } -
trunk/Source/WebKit/WebProcess/WebProcess.cpp
r239671 r239727 382 382 setShouldUseFontSmoothing(parameters.shouldUseFontSmoothing); 383 383 384 if (parameters.shouldUseTestingNetworkSession)385 NetworkStorageSession::switchToNewTestingSession();386 387 384 ensureNetworkProcessConnection(); 388 385 … … 539 536 { 540 537 m_fullKeyboardAccessEnabled = fullKeyboardAccessEnabled; 541 }542 543 void WebProcess::addWebsiteDataStore(WebsiteDataStoreParameters&& parameters)544 {545 WebFrameNetworkingContext::ensureWebsiteDataStoreSession(WTFMove(parameters));546 }547 548 void WebProcess::destroySession(PAL::SessionID sessionID)549 {550 SessionTracker::destroySession(sessionID);551 538 } 552 539 … … 1295 1282 websiteData.entries.append(WebsiteData::Entry { origin->data(), WebsiteDataType::MemoryCache, 0 }); 1296 1283 } 1297 1298 if (websiteDataTypes.contains(WebsiteDataType::Credentials)) {1299 if (NetworkStorageSession::storageSession(sessionID))1300 websiteData.originsWithCredentials = NetworkStorageSession::storageSession(sessionID)->credentialStorage().originsWithCredentials();1301 }1302 1284 } 1303 1285 -
trunk/Source/WebKit/WebProcess/WebProcess.h
r239683 r239727 179 179 180 180 void ensureLegacyPrivateBrowsingSessionInNetworkProcess(); 181 void addWebsiteDataStore(WebsiteDataStoreParameters&&);182 void destroySession(PAL::SessionID);183 181 184 182 void pageDidEnterWindow(uint64_t pageID); -
trunk/Source/WebKit/WebProcess/WebProcess.messages.in
r239671 r239727 53 53 54 54 ClearCachedCredentials() 55 56 AddWebsiteDataStore(struct WebKit::WebsiteDataStoreParameters websiteDataStoreParameters);57 DestroySession(PAL::SessionID sessionID)58 55 59 56 # Plug-ins. -
trunk/Source/WebKitLegacy/mac/ChangeLog
r239709 r239727 1 2019-01-08 Alex Christensen <achristensen@webkit.org> 2 3 Stop using NetworkStorageSession in WebProcess 4 https://bugs.webkit.org/show_bug.cgi?id=193236 5 6 Reviewed by Don Olmstead. 7 8 * WebCoreSupport/WebFrameNetworkingContext.h: 9 * WebCoreSupport/WebFrameNetworkingContext.mm: 10 (WebFrameNetworkingContext::storageSession const): 11 * WebView/WebView.mm: 12 (-[WebView _cachedResponseForURL:]): 13 (-[WebView _clearCredentials]): 14 1 15 2019-01-07 David Kilzer <ddkilzer@apple.com> 2 16 -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.h
r210845 r239727 50 50 String sourceApplicationIdentifier() const override; 51 51 WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override; 52 WebCore::NetworkStorageSession &storageSession() const override;52 WebCore::NetworkStorageSession* storageSession() const override; 53 53 }; -
trunk/Source/WebKitLegacy/mac/WebCoreSupport/WebFrameNetworkingContext.mm
r237266 r239727 91 91 } 92 92 93 NetworkStorageSession &WebFrameNetworkingContext::storageSession() const93 NetworkStorageSession* WebFrameNetworkingContext::storageSession() const 94 94 { 95 95 ASSERT(isMainThread()); 96 96 if (frame() && frame()->page() && frame()->page()->sessionID().isEphemeral()) { 97 97 if (auto* session = NetworkStorageSession::storageSession(PAL::SessionID::legacyPrivateSessionID())) 98 return *session;98 return session; 99 99 // Some requests may still be coming shortly before WebCore updates the session ID and after WebKit destroys the private browsing session. 100 100 LOG_ERROR("Invalid session ID. Please file a bug unless you just disabled private browsing, in which case it's an expected race."); 101 101 } 102 return NetworkStorageSession::defaultStorageSession();102 return &NetworkStorageSession::defaultStorageSession(); 103 103 } -
trunk/Source/WebKitLegacy/mac/WebView/WebView.mm
r239709 r239727 3669 3669 return nil; 3670 3670 3671 if ( CFURLStorageSessionRef storageSession = _private->page->mainFrame().loader().networkingContext()->storageSession().platformSession())3671 if (auto storageSession = _private->page->mainFrame().loader().networkingContext()->storageSession()->platformSession()) 3672 3672 cachedResponse = cachedResponseForRequest(storageSession, request.get()); 3673 3673 else … … 9252 9252 return; 9253 9253 9254 networkingContext->storageSession() .credentialStorage().clearCredentials();9254 networkingContext->storageSession()->credentialStorage().clearCredentials(); 9255 9255 } 9256 9256 -
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameNetworkingContext.cpp
r238298 r239727 100 100 } 101 101 102 NetworkStorageSession &WebFrameNetworkingContext::storageSession() const102 NetworkStorageSession* WebFrameNetworkingContext::storageSession() const 103 103 { 104 104 ASSERT(isMainThread()); 105 105 106 106 if (frame() && frame()->page()->usesEphemeralSession()) 107 return *NetworkStorageSession::storageSession(PAL::SessionID::legacyPrivateSessionID());107 return NetworkStorageSession::storageSession(PAL::SessionID::legacyPrivateSessionID()); 108 108 109 return NetworkStorageSession::defaultStorageSession();109 return &NetworkStorageSession::defaultStorageSession(); 110 110 } -
trunk/Source/WebKitLegacy/win/WebCoreSupport/WebFrameNetworkingContext.h
r210845 r239727 48 48 49 49 WebCore::ResourceError blockedError(const WebCore::ResourceRequest&) const override; 50 WebCore::NetworkStorageSession &storageSession() const override;50 WebCore::NetworkStorageSession* storageSession() const override; 51 51 };
Note:
See TracChangeset
for help on using the changeset viewer.