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

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: Add more instrumentation 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
« net/quic/quic_http_stream.cc ('K') | « 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 bcb9dc1737003f79333ce5c962f2ce04dbc36164..8c6f7d35c2a6d5b476ee14d993d7d879f61f2986 100644
--- a/net/quic/quic_spdy_stream.cc
+++ b/net/quic/quic_spdy_stream.cc
@@ -4,6 +4,10 @@
#include "net/quic/quic_spdy_stream.h"
+// TODO(rtenneti): Temporary while investigating crbug.com/585591.
+#ifdef TEMP_INSTRUMENTATION_585591
+#include "base/debug/alias.h"
+#endif
#include "base/logging.h"
#include "base/strings/string_number_conversions.h"
#include "net/quic/quic_bug_tracker.h"
@@ -37,6 +41,25 @@ QuicSpdyStream::QuicSpdyStream(QuicStreamId id, QuicSpdySession* spdy_session)
QuicSpdyStream::~QuicSpdyStream() {
spdy_session_->UnregisterStreamPriority(id());
+ // TODO(rtenneti): Temporary until crbug.com/585591 is solved.
+ liveness_ = DEAD;
+#ifdef TEMP_INSTRUMENTATION_585591
+ stack_trace_ = base::debug::StackTrace();
+ // Probably not necessary, but just in case compiler tries to optimize out
+ // the writes to stack_trace_.
+ base::debug::Alias(&stack_trace_);
+ // Get callstack, if the object is going away and we are doing a Read().
+ CHECK(!read_is_called_);
+#endif
+}
+
+// TODO(rtenneti): Temporary until crbug.com/585591 is solved.
+void QuicSpdyStream::CrashIfInvalid() const {
eroman 2016/02/12 01:42:46 I believe you want to either copy stack_trace_ to
ramant (doing other things) 2016/02/12 02:47:09 +1. Removed the stack_trace_. Done.
+ Liveness liveness = liveness_;
+ if (liveness == ALIVE)
+ return;
+ base::debug::Alias(&liveness);
+ CHECK_EQ(ALIVE, liveness);
}
void QuicSpdyStream::CloseWriteSide() {
« net/quic/quic_http_stream.cc ('K') | « net/quic/quic_spdy_stream.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698