Changeset 163150 in webkit
- Timestamp:
- Jan 30, 2014 7:16:21 PM (10 years ago)
- Location:
- trunk/Source/WebKit2
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebKit2/ChangeLog
r163149 r163150 1 2014-01-30 Commit Queue <commit-queue@webkit.org> 2 3 Unreviewed, rolling out r163125. 4 http://trac.webkit.org/changeset/163125 5 https://bugs.webkit.org/show_bug.cgi?id=127980 6 7 caused 9 layout tests to assert and crash (Requested by estes 8 on #webkit). 9 10 * NetworkProcess/mac/RemoteNetworkingContext.mm: 11 (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): 12 * Shared/SessionTracker.cpp: 13 (WebKit::SessionTracker::session): 14 (WebKit::SessionTracker::setSession): 15 (WebKit::SessionTracker::destroySession): 16 * Shared/SessionTracker.h: 17 * UIProcess/WebPageProxy.cpp: 18 (WebKit::WebPageProxy::setSession): 19 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 20 (WebKit::legacySessionID): 21 (WebKit::WebPlatformStrategies::cookiesForDOM): 22 (WebKit::WebPlatformStrategies::setCookiesFromDOM): 23 (WebKit::WebPlatformStrategies::cookiesEnabled): 24 (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): 25 (WebKit::WebPlatformStrategies::getRawCookies): 26 (WebKit::WebPlatformStrategies::deleteCookie): 27 * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: 28 (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): 29 * WebProcess/WebPage/WebPage.cpp: 30 * WebProcess/WebPage/WebPage.h: 31 (WebKit::WebPage::setSessionID): 32 1 33 2014-01-30 Anders Carlsson <andersca@apple.com> 2 34 -
trunk/Source/WebKit2/NetworkProcess/mac/RemoteNetworkingContext.mm
r163125 r163150 80 80 void RemoteNetworkingContext::ensurePrivateBrowsingSession(uint64_t sessionID) 81 81 { 82 ASSERT(SessionTracker::isEphemeralID(sessionID));83 84 82 if (SessionTracker::session(sessionID)) 85 83 return; -
trunk/Source/WebKit2/Shared/SessionTracker.cpp
r163125 r163150 45 45 } 46 46 47 static HashMap<const NetworkStorageSession*, uint64_t>& storageSessionToID()48 {49 ASSERT(isMainThread());50 51 static NeverDestroyed<HashMap<const NetworkStorageSession*, uint64_t>> map;52 return map.get();53 }54 55 47 static String& identifierBase() 56 48 { … … 75 67 if (sessionID == defaultSessionID) 76 68 return &NetworkStorageSession::defaultStorageSession(); 77 return staticSessionMap().get(sessionID); 78 } 79 80 uint64_t SessionTracker::sessionID(const NetworkStorageSession& session) 81 { 82 if (&session == &NetworkStorageSession::defaultStorageSession()) 83 return defaultSessionID; 84 return storageSessionToID().get(&session); 69 return staticSessionMap().add(sessionID, nullptr).iterator->value.get(); 85 70 } 86 71 … … 88 73 { 89 74 ASSERT(sessionID != defaultSessionID); 90 storageSessionToID().set(session.get(), sessionID); 91 staticSessionMap().set(sessionID, std::move(session)); 75 staticSessionMap().add(sessionID, nullptr).iterator->value = std::move(session); 92 76 } 93 77 … … 96 80 ASSERT(isMainThread()); 97 81 98 storageSessionToID().remove(session(sessionID));99 82 staticSessionMap().remove(sessionID); 100 83 } -
trunk/Source/WebKit2/Shared/SessionTracker.h
r163125 r163150 44 44 static const String& getIdentifierBase(); 45 45 static WebCore::NetworkStorageSession* session(uint64_t sessionID); 46 static uint64_t sessionID(const WebCore::NetworkStorageSession&);47 46 static void setSession(uint64_t sessionID, std::unique_ptr<WebCore::NetworkStorageSession>); 48 47 static void destroySession(uint64_t sessionID); -
trunk/Source/WebKit2/UIProcess/WebPageProxy.cpp
r163149 r163150 513 513 514 514 #if ENABLE(NETWORK_PROCESS) 515 if (session.isEphemeral()) 516 m_process->context().sendToNetworkingProcess(Messages::NetworkProcess::EnsurePrivateBrowsingSession(session.getID())); 515 m_process->context().sendToNetworkingProcess(Messages::NetworkProcess::EnsurePrivateBrowsingSession(session.getID())); 517 516 #endif 518 517 } -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r163125 r163150 74 74 namespace WebKit { 75 75 76 #if ENABLE(NETWORK_PROCESS) 77 static uint64_t legacySessionID(const NetworkStorageSession &session) 78 { 79 return session.isPrivateBrowsingSession() ? SessionTracker::legacyPrivateSessionID : SessionTracker::defaultSessionID; 80 } 81 #endif 82 76 83 void WebPlatformStrategies::initialize() 77 84 { … … 135 142 if (WebProcess::shared().usesNetworkProcess()) { 136 143 String result; 137 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesForDOM( SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(result), 0))144 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesForDOM(legacySessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesForDOM::Reply(result), 0)) 138 145 return String(); 139 146 return result; … … 148 155 #if ENABLE(NETWORK_PROCESS) 149 156 if (WebProcess::shared().usesNetworkProcess()) { 150 WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::SetCookiesFromDOM( SessionTracker::sessionID(session), firstParty, url, cookieString), 0);157 WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::SetCookiesFromDOM(legacySessionID(session), firstParty, url, cookieString), 0); 151 158 return; 152 159 } … … 161 168 if (WebProcess::shared().usesNetworkProcess()) { 162 169 bool result; 163 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesEnabled( SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesEnabled::Reply(result), 0))170 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookiesEnabled(legacySessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookiesEnabled::Reply(result), 0)) 164 171 return false; 165 172 return result; … … 175 182 if (WebProcess::shared().usesNetworkProcess()) { 176 183 String result; 177 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue( SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::Reply(result), 0))184 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue(legacySessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::CookieRequestHeaderFieldValue::Reply(result), 0)) 178 185 return String(); 179 186 return result; … … 188 195 #if ENABLE(NETWORK_PROCESS) 189 196 if (WebProcess::shared().usesNetworkProcess()) { 190 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::GetRawCookies( SessionTracker::sessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::GetRawCookies::Reply(rawCookies), 0))197 if (!WebProcess::shared().networkConnection()->connection()->sendSync(Messages::NetworkConnectionToWebProcess::GetRawCookies(legacySessionID(session), firstParty, url), Messages::NetworkConnectionToWebProcess::GetRawCookies::Reply(rawCookies), 0)) 191 198 return false; 192 199 return true; … … 201 208 #if ENABLE(NETWORK_PROCESS) 202 209 if (WebProcess::shared().usesNetworkProcess()) { 203 WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::DeleteCookie( SessionTracker::sessionID(session), url, cookieName), 0);210 WebProcess::shared().networkConnection()->connection()->send(Messages::NetworkConnectionToWebProcess::DeleteCookie(legacySessionID(session), url, cookieName), 0); 204 211 return; 205 212 } -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm
r163125 r163150 45 45 void WebFrameNetworkingContext::ensurePrivateBrowsingSession(uint64_t sessionID) 46 46 { 47 ASSERT(SessionTracker::isEphemeralID(sessionID));48 49 47 if (SessionTracker::session(sessionID)) 50 48 return; -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
r163125 r163150 2136 2136 } 2137 2137 2138 void WebPage::setSessionID(uint64_t sessionID)2139 {2140 m_sessionID = sessionID;2141 if (SessionTracker::isEphemeralID(sessionID))2142 WebProcess::shared().ensurePrivateBrowsingSession(sessionID);2143 }2144 2145 2138 void WebPage::didReceivePolicyDecision(uint64_t frameID, uint64_t listenerID, uint32_t policyAction, uint64_t downloadID) 2146 2139 { -
trunk/Source/WebKit2/WebProcess/WebPage/WebPage.h
r163125 r163150 182 182 uint64_t pageID() const { return m_pageID; } 183 183 uint64_t sessionID() const; 184 void setSessionID(uint64_t );184 void setSessionID(uint64_t sessionID) { m_sessionID = sessionID; } 185 185 186 186 void setSize(const WebCore::IntSize&);
Note: See TracChangeset
for help on using the changeset viewer.