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

Unified Diff: net/quic/quic_spdy_stream.cc

Issue 1688003005: QUIC - instrumentation for testing null QuicSpdyStream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 10 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 | « net/quic/quic_spdy_stream.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_spdy_stream.cc
diff --git a/net/quic/quic_spdy_stream.cc b/net/quic/quic_spdy_stream.cc
index de4725465b251894717a6b5282ef446e54659e6b..d764283986ce0cec75a8b10bb0a13f22990dd5d5 100644
--- a/net/quic/quic_spdy_stream.cc
+++ b/net/quic/quic_spdy_stream.cc
@@ -4,6 +4,8 @@
#include "net/quic/quic_spdy_stream.h"
+// TODO(rtenneti): Temporary while investigating crbug.com/585591.
+#include "base/debug/alias.h"
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "net/quic/quic_bug_tracker.h"
@@ -37,6 +39,21 @@ QuicSpdyStream::QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session)
QuicSpdyStream::~QuicSpdyStream() {
spdy_session_->UnregisterStreamPriority(id());
+ // TODO(rtenneti): Temporary until crbug.com/585591 is solved.
+ liveness_ = DEAD;
+ // Get callstack, if the object is going away and we are doing a Read().
+ bool read_in_progress = read_in_progress_;
+ base::debug::Alias(&read_in_progress);
+ CHECK(!read_in_progress);
+}
+
+// TODO(rtenneti): Temporary until crbug.com/585591 is solved.
+void QuicSpdyStream::CrashIfInvalid() const {
+ Liveness liveness = liveness_;
+ if (liveness == ALIVE)
+ return;
+ base::debug::Alias(&liveness);
+ CHECK_EQ(ALIVE, liveness);
}
void QuicSpdyStream::CloseWriteSide() {
« no previous file with comments | « net/quic/quic_spdy_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698