Revert "Add WebSocket-related CHECKs to HttpStreamFactoryImpl::Job."
This reverts commit 1a47d5d605
.
Reason for revert: https://crbug.com/825804
Original change's description:
> Add WebSocket-related CHECKs to HttpStreamFactoryImpl::Job.
>
> The primary reason for these CHECKs is to better document expectations
> in code. Also, they are CHECKs instead of DCHECKs to help track down
> crashes in case these expectations do not hold.
>
> Bug: 819101
> Change-Id: Ia309bbff2f4e048926930cd9a15fbc107994895d
> Reviewed-on: https://chromium-review.googlesource.com/975621
> Reviewed-by: Paul Jensen <pauljensen@chromium.org>
> Commit-Queue: Bence Béky <bnc@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#545196}
TBR=pauljensen@chromium.org,bnc@chromium.org
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Skipping CQ (even though original CL landed more than 24 hours ago) because
this is the top crasher in the browser process on Mac, so this should go in
before next Canary cut, and definitely before next Dev cut, but ios-simulator
bot fails with exception on multiple tries (and also with other CLs).
Bug: 819101
Change-Id: Ib998f6b92dd70df943cfb25b1418e1070cb839aa
Reviewed-on: https://chromium-review.googlesource.com/980632
Commit-Queue: Bence Béky <bnc@chromium.org>
Reviewed-by: Bence Béky <bnc@chromium.org>
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#545902}
This commit is contained in:
@@ -1051,14 +1051,8 @@ int HttpStreamFactoryImpl::Job::DoInitConnectionComplete(int result) {
|
||||
net_log_.AddEvent(
|
||||
NetLogEventType::HTTP_STREAM_REQUEST_PROTO,
|
||||
base::Bind(&NetLogHttpStreamProtoCallback, negotiated_protocol_));
|
||||
if (negotiated_protocol_ == kProtoHTTP2) {
|
||||
// If request is WebSocket, HTTP/2 must not have been advertised in
|
||||
// the TLS handshake. The TLS layer must not have accepted the
|
||||
// server choosing HTTP/2.
|
||||
// TODO(bnc): Change to DCHECK once https://crbug.com/819101 is fixed.
|
||||
CHECK(!is_websocket_);
|
||||
if (negotiated_protocol_ == kProtoHTTP2)
|
||||
using_spdy_ = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (proxy_info_.is_https() && connection_->socket() &&
|
||||
@@ -1219,10 +1213,6 @@ int HttpStreamFactoryImpl::Job::DoCreateStream() {
|
||||
|
||||
CHECK(!stream_.get());
|
||||
|
||||
// WebSocket over HTTP/2 is only allowed to use existing connections.
|
||||
// TODO(bnc): Change to DCHECK once https://crbug.com/819101 is fixed.
|
||||
CHECK(!is_websocket_ || existing_spdy_session_);
|
||||
|
||||
// It is possible that a pushed stream has been opened by a server since last
|
||||
// time Job checked above.
|
||||
if (!existing_spdy_session_) {
|
||||
|
Reference in New Issue
Block a user