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

Issue 606872 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Apr 2016
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

CronetURLRequestAdapter::GetStatusOnNetworkThread should check for null UrlRequest.

Project Member Reported by xunji...@chromium.org, Apr 26 2016

Issue description

CronetUrlRequest#getStatus checks whether there is a native CronetURLRequestAdapter before calling into the native stack. However, there is a change that made startInternal() asynchronous (https://chromium.googlesource.com/chromium/src/+/11a0bbd6293dffc9df4c4fc8f8e80887c1f01451)when there is an upload. If that's the case, we can get a getStatus() right after start() when the native adapter is initialized but not the underlying net::URLRequest. This will result in a crash when we call url_request_->GetLoadStatus(). We should do a null check.

internal bug: b/28367783.

 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 27 2016

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

commit da26cb8e57a6d64ebf1f7d4e336aa6bbcdc2a189
Author: xunjieli <xunjieli@chromium.org>
Date: Wed Apr 27 15:08:51 2016

Do a null check in CronetURLRequestAdapter::GetStatusOnNetworkThread

A recent change made startInternal() asynchronous when there is an upload,
if getStatus() is called right afterwards, we can get a native crash.

This CL adds a null check and a regression test.

BUG= 606872 

Review URL: https://codereview.chromium.org/1924593002

Cr-Commit-Position: refs/heads/master@{#390079}

[modify] https://crrev.com/da26cb8e57a6d64ebf1f7d4e336aa6bbcdc2a189/components/cronet/android/cronet_url_request_adapter.cc
[modify] https://crrev.com/da26cb8e57a6d64ebf1f7d4e336aa6bbcdc2a189/components/cronet/android/test/javatests/src/org/chromium/net/GetStatusTest.java

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

Sign in to add a comment