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

Issue 1271593002: Fix cancellation of a pair of URLRequestJob subclasses (Closed)

Created:
5 years, 4 months ago by mmenke
Modified:
5 years, 4 months ago
Reviewers:
davidben
CC:
chromium-reviews, cbentzel+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix cancellation of a pair of URLRequestJob subclasses URLRequestSimpleJob and URLRequestChromeJob can call back into their parent URLRequestJob class after Kill() has been invoked, which can cause Bad Things. Longer term, we should think about the interface between URLRequestJob and its subclasses, to see if we can create a more robust interface. BUG=508900 Committed: https://crrev.com/363ce98af274c07f43acac74b7ca7c23641c996e Cr-Commit-Position: refs/heads/master@{#342211}

Patch Set 1 #

Patch Set 2 : Fix URLRequestSimpleJob, remove bogus test #

Patch Set 3 : Fix WebUI #

Patch Set 4 : Fixes #

Total comments: 17

Patch Set 5 : Response to comments #

Patch Set 6 : Change random stuff #

Unified diffs Side-by-side diffs Delta from patch set Stats (+144 lines, -71 lines) Patch
M content/browser/webui/url_data_manager_backend.cc View 1 2 3 4 chunks +12 lines, -3 lines 0 comments Download
M content/browser/webui/url_data_manager_backend_unittest.cc View 1 2 3 4 5 1 chunk +85 lines, -32 lines 0 comments Download
M net/url_request/url_request_http_job_unittest.cc View 1 1 chunk +0 lines, -20 lines 0 comments Download
M net/url_request/url_request_job.cc View 1 2 3 2 chunks +8 lines, -2 lines 0 comments Download
M net/url_request/url_request_simple_job.h View 1 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_simple_job.cc View 1 1 chunk +5 lines, -0 lines 0 comments Download
M net/url_request/url_request_simple_job_unittest.cc View 1 2 3 4 5 3 chunks +33 lines, -14 lines 0 comments Download

Messages

Total messages: 24 (12 generated)
mmenke
URLRequestJob's API with respect to its subclasses makes me sad. :( https://codereview.chromium.org/1271593002/diff/160001/net/url_request/url_request_http_job_unittest.cc File net/url_request/url_request_http_job_unittest.cc (left): ...
5 years, 4 months ago (2015-08-03 21:01:20 UTC) #8
mmenke
Sending this to you mostly because these bugs potentially surface as a CHECK in AsyncResourceHandler, ...
5 years, 4 months ago (2015-08-03 21:02:52 UTC) #9
davidben
https://codereview.chromium.org/1271593002/diff/160001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/1271593002/diff/160001/content/browser/webui/url_data_manager_backend.cc#newcode138 content/browser/webui/url_data_manager_backend.cc:138: base::WeakPtr<URLRequestChromeJob> AsWeakPtr(); Yuck. :-( https://codereview.chromium.org/1271593002/diff/160001/content/browser/webui/url_data_manager_backend_unittest.cc File content/browser/webui/url_data_manager_backend_unittest.cc (right): https://codereview.chromium.org/1271593002/diff/160001/content/browser/webui/url_data_manager_backend_unittest.cc#newcode30 ...
5 years, 4 months ago (2015-08-05 18:56:39 UTC) #10
davidben
https://codereview.chromium.org/1271593002/diff/160001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/1271593002/diff/160001/content/browser/webui/url_data_manager_backend.cc#newcode138 content/browser/webui/url_data_manager_backend.cc:138: base::WeakPtr<URLRequestChromeJob> AsWeakPtr(); On 2015/08/05 18:56:39, David Benjamin wrote: > ...
5 years, 4 months ago (2015-08-05 18:57:08 UTC) #11
mmenke
THanks for the review! https://codereview.chromium.org/1271593002/diff/160001/content/browser/webui/url_data_manager_backend.cc File content/browser/webui/url_data_manager_backend.cc (right): https://codereview.chromium.org/1271593002/diff/160001/content/browser/webui/url_data_manager_backend.cc#newcode138 content/browser/webui/url_data_manager_backend.cc:138: base::WeakPtr<URLRequestChromeJob> AsWeakPtr(); On 2015/08/05 18:57:08, ...
5 years, 4 months ago (2015-08-05 20:00:25 UTC) #14
davidben
lgtm
5 years, 4 months ago (2015-08-06 19:09:48 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1271593002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1271593002/240001
5 years, 4 months ago (2015-08-06 19:27:08 UTC) #17
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_compile_dbg_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_compile_dbg_ng/builds/67816)
5 years, 4 months ago (2015-08-06 21:08:40 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1271593002/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1271593002/240001
5 years, 4 months ago (2015-08-06 21:11:37 UTC) #21
commit-bot: I haz the power
Committed patchset #6 (id:240001)
5 years, 4 months ago (2015-08-06 22:07:44 UTC) #22
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/363ce98af274c07f43acac74b7ca7c23641c996e Cr-Commit-Position: refs/heads/master@{#342211}
5 years, 4 months ago (2015-08-06 22:08:34 UTC) #23
Peter Kasting
5 years, 4 months ago (2015-08-07 01:22:10 UTC) #24
Message was sent while issue was closed.
A revert of this CL (patchset #6 id:240001) has been created in
https://codereview.chromium.org/1273813005/ by pkasting@chromium.org.

The reason for reverting is: Caused crashes in the following tests due to DCHECK
failures:

http/tests/serviceworker/registration.html
http/tests/serviceworker/chromium/register-error-messages.html

See e.g.
http://build.chromium.org/p/chromium.webkit/builders/WebKit%20Mac10.6%20(dbg)...
for a log..

Powered by Google App Engine
This is Rietveld 408576698