Changeset 193654 in webkit
- Timestamp:
- Dec 7, 2015 2:44:33 PM (8 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r193645 r193654 1 2015-12-07 Chris Dumez <cdumez@apple.com> 2 3 [WK2] Regression(r187691): If a page is showing an auth pane in one tab, any new tabs with same page hang until credentials are entered in first tab 4 https://bugs.webkit.org/show_bug.cgi?id=151960 5 <rdar://problem/23618112> 6 7 Reviewed by Alex Christensen. 8 9 After r187691, if a page is showing an auth pane in one tab, any new 10 tabs with same page hang until credentials are entered in first tab. 11 This is because we coalescing all authentication challenges from the 12 same domain, no matter what tab they are for. This can be confusing 13 so we now only coalesce authentication challenges within each tab, 14 by leveraging the pageID (in addition to the domain). 15 16 * Shared/Authentication/AuthenticationManager.cpp: 17 (WebKit::AuthenticationManager::shouldCoalesceChallenge): 18 (WebKit::AuthenticationManager::coalesceChallengesMatching): 19 (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): 20 * Shared/Authentication/AuthenticationManager.h: 21 1 22 2015-12-07 Beth Dakin <bdakin@apple.com> 2 23 -
trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.cpp
r192697 r193654 77 77 } 78 78 79 bool AuthenticationManager::shouldCoalesceChallenge(uint64_t challengeID, const AuthenticationChallenge& challenge) const79 bool AuthenticationManager::shouldCoalesceChallenge(uint64_t pageID, uint64_t challengeID, const AuthenticationChallenge& challenge) const 80 80 { 81 81 if (!canCoalesceChallenge(challenge)) … … 83 83 84 84 for (auto& item : m_challenges) { 85 if (item.key != challengeID && ProtectionSpace::compare(challenge.protectionSpace(), item.value.challenge.protectionSpace()))85 if (item.key != challengeID && item.value.pageID == pageID && ProtectionSpace::compare(challenge.protectionSpace(), item.value.challenge.protectionSpace())) 86 86 return true; 87 87 } … … 101 101 102 102 for (auto& item : m_challenges) { 103 if (item.key != challengeID && ProtectionSpace::compare(challenge.challenge.protectionSpace(), item.value.challenge.protectionSpace()))103 if (item.key != challengeID && item.value.pageID == challenge.pageID && ProtectionSpace::compare(challenge.challenge.protectionSpace(), item.value.challenge.protectionSpace())) 104 104 challengesToCoalesce.append(item.key); 105 105 } … … 113 113 ASSERT(frame->page()); 114 114 115 uint64_t challengeID = addChallengeToChallengeMap({authenticationChallenge 115 auto pageID = frame->page()->pageID(); 116 uint64_t challengeID = addChallengeToChallengeMap({pageID, authenticationChallenge 116 117 #if USE(NETWORK_SESSION) 117 118 , ChallengeCompletionHandler() … … 119 120 }); 120 121 121 // Coalesce challenges in the same protection space .122 if (shouldCoalesceChallenge( challengeID, authenticationChallenge))122 // Coalesce challenges in the same protection space and in the same page. 123 if (shouldCoalesceChallenge(pageID, challengeID, authenticationChallenge)) 123 124 return; 124 125 … … 132 133 ASSERT(frameID); 133 134 134 uint64_t challengeID = addChallengeToChallengeMap({authenticationChallenge, completionHandler}); 135 if (shouldCoalesceChallenge(challengeID, authenticationChallenge)) 135 uint64_t challengeID = addChallengeToChallengeMap({pageID, authenticationChallenge, completionHandler}); 136 137 // Coalesce challenges in the same protection space and in the same page. 138 if (shouldCoalesceChallenge(pageID, challengeID, authenticationChallenge)) 136 139 return; 137 140 … … 144 147 ASSERT(frameID); 145 148 146 uint64_t challengeID = addChallengeToChallengeMap({ authenticationChallenge149 uint64_t challengeID = addChallengeToChallengeMap({pageID, authenticationChallenge 147 150 #if USE(NETWORK_SESSION) 148 151 , ChallengeCompletionHandler() 149 152 #endif 150 153 }); 151 if (shouldCoalesceChallenge(challengeID, authenticationChallenge)) 154 155 // Coalesce challenges in the same protection space and in the same page. 156 if (shouldCoalesceChallenge(pageID, challengeID, authenticationChallenge)) 152 157 return; 153 158 … … 158 163 void AuthenticationManager::didReceiveAuthenticationChallenge(Download* download, const AuthenticationChallenge& authenticationChallenge) 159 164 { 160 uint64_t challengeID = addChallengeToChallengeMap({authenticationChallenge}); 161 if (shouldCoalesceChallenge(challengeID, authenticationChallenge)) 165 uint64_t dummyPageID = 0; 166 uint64_t challengeID = addChallengeToChallengeMap({dummyPageID, authenticationChallenge}); 167 168 // Coalesce challenges in the same protection space and in the same page. 169 if (shouldCoalesceChallenge(dummyPageID, challengeID, authenticationChallenge)) 162 170 return; 163 171 -
trunk/Source/WebKit2/Shared/Authentication/AuthenticationManager.h
r192982 r193654 75 75 private: 76 76 struct Challenge { 77 uint64_t pageID; 77 78 WebCore::AuthenticationChallenge challenge; 78 79 #if USE(NETWORK_SESSION) … … 87 88 88 89 uint64_t addChallengeToChallengeMap(const Challenge&); 89 bool shouldCoalesceChallenge(uint64_t challengeID, const WebCore::AuthenticationChallenge&) const;90 bool shouldCoalesceChallenge(uint64_t pageID, uint64_t challengeID, const WebCore::AuthenticationChallenge&) const; 90 91 91 92 void useCredentialForSingleChallenge(uint64_t challengeID, const WebCore::Credential&, const WebCore::CertificateInfo&);
Note: See TracChangeset
for help on using the changeset viewer.