New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 751786 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Aug 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

CronetHttpURLConnection does't handle disconnect() when it's called on another thread

Project Member Reported by xunji...@chromium.org, Aug 2 2017

Issue description

When HttpURLConnection#disconnect() is called on another thread, CronetHttpURLConnection#getResponse*() can throw null ptr exception through checkHasResponseHeaders(). This is unexpected. 
 
Project Member

Comment 1 by bugdroid1@chromium.org, Aug 4 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/9eaf1fce80e84fc119fb12225520be82c673f3ce

commit 9eaf1fce80e84fc119fb12225520be82c673f3ce
Author: Helen Li <xunjieli@chromium.org>
Date: Fri Aug 04 23:57:30 2017

[cronet] Do not throw NPE in getResponse() when HttpURLConnection#disconnect() has been called

When disconnect() is called on a different thread, CronetHttpURLConnection
can throw NPE in getResponse() when it exits the message loop.
This CL sets an IOException for the cancellation case and adds a regression
test.

Bug:  751786 
Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester
Change-Id: I64bd89ecb2f5b31a2f65c3cadeb7bcc29a96f643
Reviewed-on: https://chromium-review.googlesource.com/598772
Reviewed-by: Paul Jensen <pauljensen@chromium.org>
Commit-Queue: Paul Jensen <pauljensen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#492182}
[modify] https://crrev.com/9eaf1fce80e84fc119fb12225520be82c673f3ce/components/cronet/android/java/src/org/chromium/net/urlconnection/CronetHttpURLConnection.java
[modify] https://crrev.com/9eaf1fce80e84fc119fb12225520be82c673f3ce/components/cronet/android/test/javatests/src/org/chromium/net/urlconnection/CronetHttpURLConnectionTest.java

Labels: M-62
Status: Fixed (was: Started)

Sign in to add a comment