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

Unified Diff: net/quic/chromium/quic_http_stream.cc

Issue 2557403005: Avoid reentrancy in QuicHttpStream::HasSendHeadersComplete. (Closed)
Patch Set: Created 4 years 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/chromium/quic_http_stream.cc
diff --git a/net/quic/chromium/quic_http_stream.cc b/net/quic/chromium/quic_http_stream.cc
index c8e8b970aa7712beee203b507d6c7ae782959d23..dcd9449d6ac845de3df36f60d380276ea9ff6904 100644
--- a/net/quic/chromium/quic_http_stream.cc
+++ b/net/quic/chromium/quic_http_stream.cc
@@ -497,11 +497,10 @@ bool QuicHttpStream::HasSendHeadersComplete() {
void QuicHttpStream::OnCryptoHandshakeConfirmed() {
was_handshake_confirmed_ = true;
if (next_state_ == STATE_WAIT_FOR_CONFIRMATION_COMPLETE) {
- int rv = DoLoop(OK);
-
- if (rv != ERR_IO_PENDING && !callback_.is_null()) {
- DoCallback(rv);
- }
+ // Post a task to avoid reentrant calls into the session.
+ base::ThreadTaskRunnerHandle::Get()->PostTask(
+ FROM_HERE, base::Bind(&QuicHttpStream::OnIOComplete,
+ weak_factory_.GetWeakPtr(), OK));
}
}
« 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