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

Unified Diff: net/spdy/spdy_session.cc

Issue 12212102: SPDY - Small bug fix for user after free. Will revert the (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
===================================================================
--- net/spdy/spdy_session.cc (revision 181571)
+++ net/spdy/spdy_session.cc (working copy)
@@ -794,6 +794,13 @@
int SpdySession::DoLoop(int result) {
bytes_read_ = 0;
+
+ // The SpdyFramer will use callbacks onto |this| as it parses frames.
+ // When errors occur, those callbacks can lead to teardown of all references
+ // to |this|, so maintain a reference to self during this call for safe
+ // cleanup.
+ scoped_refptr<SpdySession> self(this);
+
do {
if (read_pending_)
return OK;
@@ -862,12 +869,6 @@
last_activity_time_ = base::TimeTicks::Now();
- // The SpdyFramer will use callbacks onto |this| as it parses frames.
- // When errors occur, those callbacks can lead to teardown of all references
- // to |this|, so maintain a reference to self during this call for safe
- // cleanup.
- scoped_refptr<SpdySession> self(this);
-
DCHECK(buffered_spdy_framer_.get());
char *data = read_buffer_->data();
while (result &&
« 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