diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-04 18:46:01 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-04 18:46:01 +0000 |
commit | 8cf610b441b2615782115a6314f7818107386dfc (patch) | |
tree | 3a086d6781c42fc11d128c6afd12cbfb3ce2c30f | |
parent | 848dd0446ed3ebc6f8ae2db868c117788bda7c2f (diff) | |
download | chromium_src-8cf610b441b2615782115a6314f7818107386dfc.zip chromium_src-8cf610b441b2615782115a6314f7818107386dfc.tar.gz chromium_src-8cf610b441b2615782115a6314f7818107386dfc.tar.bz2 |
Add local variables to track down a crash.
There's been a SPDY crasher for awhile. Try to figure out what's causing this. Mainly I want to know what the result code is.
BUG=80095
TEST=none
Review URL: http://codereview.chromium.org/7065078
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@87928 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | net/http/http_stream_factory_impl_job.cc | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/net/http/http_stream_factory_impl_job.cc b/net/http/http_stream_factory_impl_job.cc index 401ba7d..1efd1cc 100644 --- a/net/http/http_stream_factory_impl_job.cc +++ b/net/http/http_stream_factory_impl_job.cc @@ -703,6 +703,39 @@ int HttpStreamFactoryImpl::Job::DoInitConnectionComplete(int result) { return result; } + if (!connection_->socket()) { + // If we enter this code path, then we'll cause a crash later in + // DoCreateStream(). Crash now and figure out what happened: + // http://crbug.com/80095. + GURL url = original_url_.get() ? *original_url_ : request_info_.url; + bool using_ssl = using_ssl_; + bool using_spdy = using_spdy_; + + // Note that these local variables have their addresses referenced to + // prevent the compiler from optimizing them away. + if (using_spdy) { + LOG(FATAL) << "Crashing here because willchan doesn't know why we're " + << "crashing later. Sorry! I'll give you a cookie later. " + << "Cheers mate!\n" + << "url[" << &url << "]: " << url << "\n" + << "using_ssl[" << &using_ssl << "]: " + << (using_ssl ? "true\n" : "false\n") + << "using_spdy[" << &using_spdy << "]: " + << (using_spdy ? "true\n" : "false\n") + << "result: " << result; + } else { + LOG(FATAL) << "Crashing here because willchan doesn't know why we're " + << "crashing later. Sorry! I'll give you a cookie later. " + << "Cheers mate!\n" + << "url[" << &url << "]: " << url << "\n" + << "using_ssl[" << &using_ssl << "]: " + << (using_ssl ? "true\n" : "false\n") + << "using_spdy[" << &using_spdy << "]: " + << (using_spdy ? "true\n" : "false\n") + << "result: " << result; + } + } + next_state_ = STATE_CREATE_STREAM; return OK; } |