Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Issue 2486033002: NQE: Use ResponseHeaders to get the HTTP status code (Closed)

Created:
4 years, 1 month ago by tbansal1
Modified:
4 years, 1 month ago
Reviewers:
mmenke
CC:
chromium-reviews, cbentzel+watch_chromium.org, tbansal+watch-nqe_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

NQE: Use ResponseHeaders to get the HTTP status code After the request has completed, it is unsafe to access some of the member functions of the request. This CL replaces invocation of GetResponseCode() by looking up the response code in ResponseInfoHeaders. CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.android:android_cronet_tester BUG=663456 Committed: https://crrev.com/3f4b9da10b124cf841a5691abd4ede58f768be42 Cr-Commit-Position: refs/heads/master@{#430867}

Patch Set 1 #

Patch Set 2 : Add redirect test #

Total comments: 2

Patch Set 3 : ps #

Patch Set 4 : Fix tests #

Patch Set 5 : cleanup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+50 lines, -22 lines) Patch
M net/nqe/network_quality_estimator.cc View 2 chunks +5 lines, -1 line 0 comments Download
M net/nqe/network_quality_estimator_test_util.h View 1 2 3 4 4 chunks +11 lines, -5 lines 0 comments Download
M net/nqe/network_quality_estimator_test_util.cc View 1 2 3 4 4 chunks +18 lines, -16 lines 0 comments Download
M net/nqe/network_quality_estimator_unittest.cc View 1 2 3 2 chunks +16 lines, -0 lines 0 comments Download

Messages

Total messages: 37 (26 generated)
tbansal1
mmenke: ptal. Thanks.
4 years, 1 month ago (2016-11-08 20:33:33 UTC) #4
mmenke
On 2016/11/08 20:33:33, tbansal1 wrote: > mmenke: ptal. Thanks. LGTM!
4 years, 1 month ago (2016-11-08 20:46:56 UTC) #5
mmenke
On 2016/11/08 20:46:56, mmenke wrote: > On 2016/11/08 20:33:33, tbansal1 wrote: > > mmenke: ptal. ...
4 years, 1 month ago (2016-11-08 20:48:18 UTC) #6
tbansal1
On 2016/11/08 20:48:18, mmenke wrote: > On 2016/11/08 20:46:56, mmenke wrote: > > On 2016/11/08 ...
4 years, 1 month ago (2016-11-08 21:15:29 UTC) #7
mmenke
https://codereview.chromium.org/2486033002/diff/20001/net/nqe/network_quality_estimator_test_util.cc File net/nqe/network_quality_estimator_test_util.cc (right): https://codereview.chromium.org/2486033002/diff/20001/net/nqe/network_quality_estimator_test_util.cc#newcode88 net/nqe/network_quality_estimator_test_util.cc:88: return embedded_test_server_.GetURL("/redirect302-to-https"); Doesn't look like the embedded test server ...
4 years, 1 month ago (2016-11-08 21:52:56 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2486033002/80001
4 years, 1 month ago (2016-11-09 04:58:13 UTC) #30
tbansal1
https://codereview.chromium.org/2486033002/diff/20001/net/nqe/network_quality_estimator_test_util.cc File net/nqe/network_quality_estimator_test_util.cc (right): https://codereview.chromium.org/2486033002/diff/20001/net/nqe/network_quality_estimator_test_util.cc#newcode88 net/nqe/network_quality_estimator_test_util.cc:88: return embedded_test_server_.GetURL("/redirect302-to-https"); On 2016/11/08 21:52:56, mmenke wrote: > Doesn't ...
4 years, 1 month ago (2016-11-09 04:59:18 UTC) #31
commit-bot: I haz the power
Committed patchset #5 (id:80001)
4 years, 1 month ago (2016-11-09 05:03:33 UTC) #33
commit-bot: I haz the power
Patchset 5 (id:??) landed as https://crrev.com/3f4b9da10b124cf841a5691abd4ede58f768be42 Cr-Commit-Position: refs/heads/master@{#430867}
4 years, 1 month ago (2016-11-09 05:06:34 UTC) #35
mmenke
You probably should have waited for me to review the test. So with the modified ...
4 years, 1 month ago (2016-11-09 15:05:21 UTC) #36
tbansal1
4 years, 1 month ago (2016-11-09 22:38:37 UTC) #37
Message was sent while issue was closed.
On 2016/11/09 15:05:21, mmenke wrote:
> You probably should have waited for me to review the test.  So with the
modified
> test, can this code run into the crash, without the fix?

Yes, the test crashes without the fix,
although only if I move the call to GetResponseCode() earlier.
Please see https://codereview.chromium.org/2486373002/ on 
how this test would crash if I move the call to the function earlier.
Moving the call earlier prevents the function
from returning earlier on Line 582:
(if (net_error != OK) {return;}).

Powered by Google App Engine
This is Rietveld 408576698