Title: [235400] trunk/Source/WebKit
Revision
235400
Author
[email protected]
Date
2018-08-27 14:11:47 -0700 (Mon, 27 Aug 2018)

Log Message

Pass webPageID and webFrameID to NetworkLoad for speculative loads
https://bugs.webkit.org/show_bug.cgi?id=188682

Reviewed by Youenn Fablet.

This also removes an authentication shortcut I introduced in r234941

* NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
(WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
(WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):

Modified Paths

Diff

Modified: trunk/Source/WebKit/ChangeLog (235399 => 235400)


--- trunk/Source/WebKit/ChangeLog	2018-08-27 21:11:22 UTC (rev 235399)
+++ trunk/Source/WebKit/ChangeLog	2018-08-27 21:11:47 UTC (rev 235400)
@@ -1,5 +1,20 @@
 2018-08-27  Alex Christensen  <[email protected]>
 
+        Pass webPageID and webFrameID to NetworkLoad for speculative loads
+        https://bugs.webkit.org/show_bug.cgi?id=188682
+
+        Reviewed by Youenn Fablet.
+
+        This also removes an authentication shortcut I introduced in r234941
+
+        * NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp:
+        (WebKit::NetworkCache::SpeculativeLoad::SpeculativeLoad):
+        (WebKit::NetworkCache::SpeculativeLoad::didReceiveResponse):
+        * Shared/Authentication/AuthenticationManager.cpp:
+        (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge):
+
+2018-08-27  Alex Christensen  <[email protected]>
+
         Remove most of LoaderClient
         https://bugs.webkit.org/show_bug.cgi?id=188997
 

Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp (235399 => 235400)


--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp	2018-08-27 21:11:22 UTC (rev 235399)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.cpp	2018-08-27 21:11:47 UTC (rev 235400)
@@ -41,9 +41,9 @@
 
 using namespace WebCore;
 
-SpeculativeLoad::SpeculativeLoad(Cache& cache, const GlobalFrameID& frameID, const ResourceRequest& request, std::unique_ptr<NetworkCache::Entry> cacheEntryForValidation, RevalidationCompletionHandler&& completionHandler)
+SpeculativeLoad::SpeculativeLoad(Cache& cache, const GlobalFrameID& globalFrameID, const ResourceRequest& request, std::unique_ptr<NetworkCache::Entry> cacheEntryForValidation, RevalidationCompletionHandler&& completionHandler)
     : m_cache(cache)
-    , m_frameID(frameID)
+    , m_globalFrameID(globalFrameID)
     , m_completionHandler(WTFMove(completionHandler))
     , m_originalRequest(request)
     , m_bufferedDataForCache(SharedBuffer::create())
@@ -52,6 +52,8 @@
     ASSERT(!m_cacheEntry || m_cacheEntry->needsValidation());
 
     NetworkLoadParameters parameters;
+    parameters.webPageID = globalFrameID.first;
+    parameters.webFrameID = globalFrameID.second;
     parameters.sessionID = PAL::SessionID::defaultSessionID();
     parameters.storedCredentialsPolicy = StoredCredentialsPolicy::Use;
     parameters.contentSniffingPolicy = ContentSniffingPolicy::DoNotSniffContent;
@@ -87,7 +89,7 @@
 
     bool validationSucceeded = m_response.httpStatusCode() == 304; // 304 Not Modified
     if (validationSucceeded && m_cacheEntry)
-        m_cacheEntry = m_cache->update(m_originalRequest, m_frameID, *m_cacheEntry, m_response);
+        m_cacheEntry = m_cache->update(m_originalRequest, m_globalFrameID, *m_cacheEntry, m_response);
     else
         m_cacheEntry = nullptr;
 

Modified: trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.h (235399 => 235400)


--- trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.h	2018-08-27 21:11:22 UTC (rev 235399)
+++ trunk/Source/WebKit/NetworkProcess/cache/NetworkCacheSpeculativeLoad.h	2018-08-27 21:11:47 UTC (rev 235400)
@@ -64,7 +64,7 @@
     void didComplete();
 
     Ref<Cache> m_cache;
-    GlobalFrameID m_frameID;
+    GlobalFrameID m_globalFrameID;
     RevalidationCompletionHandler m_completionHandler;
     WebCore::ResourceRequest m_originalRequest;
 

Modified: trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp (235399 => 235400)


--- trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp	2018-08-27 21:11:22 UTC (rev 235399)
+++ trunk/Source/WebKit/Shared/Authentication/AuthenticationManager.cpp	2018-08-27 21:11:47 UTC (rev 235400)
@@ -111,8 +111,8 @@
 
 void AuthenticationManager::didReceiveAuthenticationChallenge(uint64_t pageID, uint64_t frameID, const AuthenticationChallenge& authenticationChallenge, ChallengeCompletionHandler&& completionHandler)
 {
-    if (!pageID || !frameID) // Initiated by SpeculativeLoadManager
-        return completionHandler(AuthenticationChallengeDisposition::RejectProtectionSpace, { });
+    ASSERT(pageID);
+    ASSERT(frameID);
 
     uint64_t challengeID = addChallengeToChallengeMap({ pageID, authenticationChallenge, WTFMove(completionHandler) });
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to