|
|
Chromium Code Reviews
DescriptionNQE: 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 #
Messages
Total messages: 37 (26 generated)
Description was changed from ========== Use ResponseHeaders to get the HTTP status code BUG= ========== to ========== 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. BUG=663456 ==========
Description was changed from ========== 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. BUG=663456 ========== to ========== 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. BUG=663456 ==========
tbansal@chromium.org changed reviewers: + mmenke@chromium.org
mmenke: ptal. Thanks.
On 2016/11/08 20:33:33, tbansal1 wrote: > mmenke: ptal. Thanks. LGTM!
On 2016/11/08 20:46:56, mmenke wrote: > On 2016/11/08 20:33:33, tbansal1 wrote: > > mmenke: ptal. Thanks. > > LGTM! Probably a good idea to add a test that would catch this (Make some TEST_P tests that try different field trials, and make sure there's an NQE redirect test)
On 2016/11/08 20:48:18, mmenke wrote: > On 2016/11/08 20:46:56, mmenke wrote: > > On 2016/11/08 20:33:33, tbansal1 wrote: > > > mmenke: ptal. Thanks. > > > > LGTM! > > Probably a good idea to add a test that would catch this (Make some TEST_P tests > that try different field trials, and make sure there's an NQE redirect test) I added the test but it does not catch the regression.
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/bui...)
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2486033002/diff/20001/net/nqe/network_quality... File net/nqe/network_quality_estimator_test_util.cc (right): https://codereview.chromium.org/2486033002/diff/20001/net/nqe/network_quality... 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 is correctly configured to use the directory with this file in it, so it's just returning the default response. You need to use "PathService::Get(base::DIR_SOURCE_ROOT, &path);", and then append net/data/url_request_unittest to that in your test_util code.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
Description was changed from ========== 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. BUG=663456 ========== to ========== 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 ==========
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by tbansal@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
The CQ bit was checked by tbansal@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from mmenke@chromium.org Link to the patchset: https://codereview.chromium.org/2486033002/#ps80001 (title: "cleanup")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2486033002/diff/20001/net/nqe/network_quality... File net/nqe/network_quality_estimator_test_util.cc (right): https://codereview.chromium.org/2486033002/diff/20001/net/nqe/network_quality... 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 look like the embedded test server is correctly configured to use the > directory with this file in it, so it's just returning the default response. > > You need to use "PathService::Get(base::DIR_SOURCE_ROOT, &path);", and then > append net/data/url_request_unittest to that in your test_util code. Fixed but in a different way.
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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 ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001)
Message was sent while issue was closed.
Description was changed from ========== 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 ========== to ========== 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} ==========
Message was sent while issue was closed.
Patchset 5 (id:??) landed as https://crrev.com/3f4b9da10b124cf841a5691abd4ede58f768be42 Cr-Commit-Position: refs/heads/master@{#430867}
Message was sent while issue was closed.
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?
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;}). |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
