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

Issue 2399463002: Clear mojo URLLoaderClient in ResourceDispatcher on cancellation (Closed)

Created:
4 years, 2 months ago by tzik
Modified:
4 years, 2 months ago
Reviewers:
jam, yhirano
CC:
chromium-reviews, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Clear mojo URLLoaderClient in ResourceDispatcher on cancellation If a URL request is cancelled by a requester, there's a chance on URLResponseBodyConsumer to run OnReadable() on an invalid ResourceDispatcher::PendingRequestInfo. That causes a null pointer access. This CL clears the URLLoaderClient earlier in the cancellation phase to avoid the crash. BUG=603396 Committed: https://crrev.com/bc1ffa6150628c6ddb8ae3cf51b8e9d0e965f1a4 Cr-Commit-Position: refs/heads/master@{#423779}

Patch Set 1 #

Total comments: 4

Patch Set 2 : +comment. clear url_loader_client unconditionally #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -0 lines) Patch
M content/child/resource_dispatcher.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 25 (13 generated)
tzik
PTAL
4 years, 2 months ago (2016-10-05 07:05:18 UTC) #4
yhirano
https://codereview.chromium.org/2399463002/diff/1/content/child/resource_dispatcher.cc File content/child/resource_dispatcher.cc (right): https://codereview.chromium.org/2399463002/diff/1/content/child/resource_dispatcher.cc#newcode457 content/child/resource_dispatcher.cc:457: it->second->url_loader_client = nullptr; Would Calling Cancel be enough?
4 years, 2 months ago (2016-10-05 09:03:00 UTC) #5
tzik
https://codereview.chromium.org/2399463002/diff/1/content/child/resource_dispatcher.cc File content/child/resource_dispatcher.cc (right): https://codereview.chromium.org/2399463002/diff/1/content/child/resource_dispatcher.cc#newcode457 content/child/resource_dispatcher.cc:457: it->second->url_loader_client = nullptr; On 2016/10/05 09:03:00, yhirano wrote: > ...
4 years, 2 months ago (2016-10-06 04:14:02 UTC) #6
yhirano
lgtm https://codereview.chromium.org/2399463002/diff/1/content/child/resource_dispatcher.cc File content/child/resource_dispatcher.cc (right): https://codereview.chromium.org/2399463002/diff/1/content/child/resource_dispatcher.cc#newcode457 content/child/resource_dispatcher.cc:457: it->second->url_loader_client = nullptr; Can you run this statement ...
4 years, 2 months ago (2016-10-06 06:53:05 UTC) #7
tzik
Adding jam@ as a //content owner. PTAL. https://codereview.chromium.org/2399463002/diff/1/content/child/resource_dispatcher.cc File content/child/resource_dispatcher.cc (right): https://codereview.chromium.org/2399463002/diff/1/content/child/resource_dispatcher.cc#newcode457 content/child/resource_dispatcher.cc:457: it->second->url_loader_client = ...
4 years, 2 months ago (2016-10-06 12:08:13 UTC) #12
jam
lgtm is it possible to write a test for this?
4 years, 2 months ago (2016-10-06 15:39:37 UTC) #15
tzik
On 2016/10/06 15:39:37, jam wrote: > lgtm > > is it possible to write a ...
4 years, 2 months ago (2016-10-06 15:51:24 UTC) #16
jam
On 2016/10/06 15:51:24, tzik wrote: > On 2016/10/06 15:39:37, jam wrote: > > lgtm > ...
4 years, 2 months ago (2016-10-06 22:55:29 UTC) #17
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/2399463002/20001
4 years, 2 months ago (2016-10-07 02:02:28 UTC) #20
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 2 months ago (2016-10-07 02:08:26 UTC) #22
commit-bot: I haz the power
Patchset 2 (id:??) landed as https://crrev.com/bc1ffa6150628c6ddb8ae3cf51b8e9d0e965f1a4 Cr-Commit-Position: refs/heads/master@{#423779}
4 years, 2 months ago (2016-10-07 02:09:56 UTC) #24
Finnur
4 years, 2 months ago (2016-10-07 15:51:09 UTC) #25
Message was sent while issue was closed.
A revert of this CL (patchset #2 id:20001) has been created in
https://codereview.chromium.org/2396393002/ by finnur@chromium.org.

The reason for reverting is: This is a speculative revert...

Two tests started failing somewhat reliably on Win7 in the build where this was
checked in and all the other CLs in that build look completely unrelated.

NavigatingExtensionPopupBrowserTest.DownloadViaPost
PageLoadMetricsBrowserTest.IgnoreDownloads

I've actually already disabled the NavigatingExtensionPopupBrowserTest in a
separate CL, but if the PageLoadMetricsBrowserTest doesn't get fixed with this
revert then we can undo the revert..

Powered by Google App Engine
This is Rietveld 408576698