Chromium Code Reviews| Index: components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java |
| diff --git a/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java b/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java |
| index 5e943043e1d490592c137c0a7cccb463a0ff1b4c..4afa927f29d2c889c3521ad3deccd5c079b7bcb0 100644 |
| --- a/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java |
| +++ b/components/cronet/android/java/src/org/chromium/net/CronetBidirectionalStream.java |
| @@ -555,13 +555,23 @@ class CronetBidirectionalStream extends BidirectionalStream { |
| @SuppressWarnings("unused") |
| @CalledByNative |
| - private void onError( |
| - int errorCode, int nativeError, String errorString, long receivedBytesCount) { |
| + private void onError(int errorCode, int nativeError, int nativeQuicError, String errorString, |
| + long receivedBytesCount) { |
| if (mResponseInfo != null) { |
| mResponseInfo.setReceivedBytesCount(receivedBytesCount); |
| } |
| - failWithException(new CronetException( |
| - "Exception in BidirectionalStream: " + errorString, errorCode, nativeError)); |
| + CronetException exception; |
| + if (nativeError == NetError.ERR_QUIC_PROTOCOL_ERROR) { |
| + // nativeQuicError here will always be 0 (QUIC_NO_ERROR), so this isn't useful yet. |
| + // Adding it now anyway for uniformity with CronetUrlRequest. |
| + // TODO(mgersh): plumb through the real QUIC error code |
|
pauljensen
2016/06/30 17:35:12
I'm not a fan of having a comment in one place tal
mgersh
2016/06/30 22:55:53
Done.
|
| + exception = new QuicException("Exception in BidirectionalStream: " + errorString, |
| + nativeError, nativeQuicError); |
| + } else { |
| + exception = new CronetException( |
| + "Exception in BidirectionalStream: " + errorString, errorCode, nativeError); |
| + } |
| + failWithException(exception); |
| } |
| /** |