diff options
author | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 20:17:06 +0000 |
---|---|---|
committer | vandebo@chromium.org <vandebo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-03-21 20:17:06 +0000 |
commit | 8c060008bcd463da28c49c58f6d88f632ad6cfe4 (patch) | |
tree | bfe08b9a1ba7b2e200ae9e8cfb57c6d4fb195e04 /net/spdy/spdy_test_util_common.h | |
parent | 596f7e7939f195288d621f18302f4cc5a2e97b17 (diff) | |
download | chromium_src-8c060008bcd463da28c49c58f6d88f632ad6cfe4.zip chromium_src-8c060008bcd463da28c49c58f6d88f632ad6cfe4.tar.gz chromium_src-8c060008bcd463da28c49c58f6d88f632ad6cfe4.tar.bz2 |
Revert of Fix SPDY error-handling if the connection gets closed just after use. (https://codereview.chromium.org/200723004/)
Reason for revert:
Linux LSan isn't happy: AddressSanitizer: stack-buffer-overflow
http://build.chromium.org/p/chromium.memory/builders/Linux%20ASan%2BLSan%20Tests%20%281%29/builds/650/steps/net_unittests/logs/GetUploadProgressBeforeInitialization_0
Original issue's description:
> Fix SPDY error-handling if the connection gets closed just after use.
>
> - Make SpdySession::IsReused() return true if the underlying socket was
> UNUSED_IDLE. This makes the HttpNetworkTransaction-level retry try a fresh
> socket in case a preconnected socket was stale.
>
> - If the SpdySession closes in an event loop iteration between
> HttpStreamFactoryImplJob::DoCreateStream and OnNewSpdySessionReadyCallback,
> propogate the error to the request to prevent it from hanging. Do so by
> creating the originating request's SpdyHttpStream as soon as the SpdySession
> is created so it can sample SpdySession::IsReused() and advise
> HttpNetworkTransaction on error.
>
> - Delay pumping the SpdySession read loop by an event loop iteration. This
> simplifies some logic and ensures that HttpNetworkTransaction receives a
> SpdyHttpStream to advise retry logic. This does mean we lose the error code;
> it now follows the asynchronous case and turns into ERR_CONNECTION_CLOSED in
> SpdyHttpStream::InitializeStream.
>
> BUG=352156
>
> Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=258647
TBR=rch@chromium.org,davidben@chromium.org
NOTREECHECKS=true
NOTRY=true
BUG=352156
Review URL: https://codereview.chromium.org/208663003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@258657 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_test_util_common.h')
-rw-r--r-- | net/spdy/spdy_test_util_common.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/net/spdy/spdy_test_util_common.h b/net/spdy/spdy_test_util_common.h index 668a7e8..42b595b 100644 --- a/net/spdy/spdy_test_util_common.h +++ b/net/spdy/spdy_test_util_common.h @@ -247,9 +247,8 @@ base::WeakPtr<SpdySession> CreateInsecureSpdySession( // Tries to create a SPDY session for the given key but expects the // attempt to fail with the given error. A SPDY session for |key| must -// not already exist. The session will be created but close in the -// next event loop iteration. -base::WeakPtr<SpdySession> TryCreateInsecureSpdySessionExpectingFailure( +// not already exist. +void TryCreateInsecureSpdySessionExpectingFailure( const scoped_refptr<HttpNetworkSession>& http_session, const SpdySessionKey& key, Error expected_error, @@ -270,12 +269,10 @@ base::WeakPtr<SpdySession> CreateFakeSpdySession(SpdySessionPool* pool, // Tries to create an insecure SPDY session for the given key but // expects the attempt to fail with the given error. The session will // neither receive nor send any data. A SPDY session for |key| must -// not already exist. The session will be created but close in the -// next event loop iteration. -base::WeakPtr<SpdySession> TryCreateFakeSpdySessionExpectingFailure( - SpdySessionPool* pool, - const SpdySessionKey& key, - Error expected_error); +// not already exist. +void TryCreateFakeSpdySessionExpectingFailure(SpdySessionPool* pool, + const SpdySessionKey& key, + Error expected_error); class SpdySessionPoolPeer { public: |