Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Unified Diff: trunk/src/net/spdy/spdy_session_pool.cc

Issue 310563002: Revert 273680 "Defer SpdySession destruction to support closing ..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « trunk/src/net/spdy/spdy_session.cc ('k') | trunk/src/net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: trunk/src/net/spdy/spdy_session_pool.cc
===================================================================
--- trunk/src/net/spdy/spdy_session_pool.cc (revision 274100)
+++ trunk/src/net/spdy/spdy_session_pool.cc (working copy)
@@ -71,12 +71,6 @@
SpdySessionPool::~SpdySessionPool() {
CloseAllSessions();
- while (!sessions_.empty()) {
- // Destroy sessions to enforce that lifetime is scoped to SpdySessionPool.
- // Write callbacks queued upon session drain are not invoked.
- RemoveUnavailableSession((*sessions_.begin())->GetWeakPtr());
- }
-
if (ssl_config_service_.get())
ssl_config_service_->RemoveObserver(this);
NetworkChangeNotifier::RemoveIPAddressObserver(this);
@@ -250,7 +244,7 @@
}
void SpdySessionPool::CloseAllSessions() {
- while (!available_sessions_.empty()) {
+ while (!sessions_.empty()) {
CloseCurrentSessionsHelper(ERR_ABORTED, "Closing all sessions.",
false /* idle_only */);
}
@@ -286,7 +280,7 @@
#else
(*it)->CloseSessionOnError(ERR_NETWORK_CHANGED,
"Closing current sessions.");
- DCHECK((*it)->IsDraining());
+ DCHECK(!*it);
#endif // defined(OS_ANDROID) || defined(OS_WIN) || defined(OS_IOS)
DCHECK(!IsSessionAvailable(*it));
}
@@ -395,6 +389,7 @@
(*it)->CloseSessionOnError(error, description);
DCHECK(!IsSessionAvailable(*it));
+ DCHECK(!*it);
}
}
« no previous file with comments | « trunk/src/net/spdy/spdy_session.cc ('k') | trunk/src/net/spdy/spdy_session_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698