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

Unified Diff: net/quic/quic_connection.cc

Issue 1656673002: QUIC - Fix for crash in stable channel. Check for null |visitor_| before (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_connection.cc
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc
index 79f0d5d25ecda3306082fc2ba7ce71c50e2f3ea0..c0d064aa3a1a13c9bb51981f0de9396eda9a3fd5 100644
--- a/net/quic/quic_connection.cc
+++ b/net/quic/quic_connection.cc
@@ -2073,7 +2073,11 @@ void QuicConnection::CloseConnection(QuicErrorCode error, bool from_peer) {
}
connected_ = false;
DCHECK(visitor_ != nullptr);
- visitor_->OnConnectionClosed(error, from_peer);
+ // TODO(rtenneti): crbug.com/546668. A temporary fix. Added a check for null
+ // |visitor_| to fix crash bug. Delete it after fix is merged.
+ if (visitor_) {
+ visitor_->OnConnectionClosed(error, from_peer);
+ }
Ryan Hamilton 2016/02/01 03:39:31 Would it be worth adding an: } else { UMA_HISTO
ramant (doing other things) 2016/02/01 17:50:27 Good idea. Done.
if (debug_visitor_ != nullptr) {
debug_visitor_->OnConnectionClosed(error, from_peer);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698