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

Issue 2586543003: Add logging for request blocking by the RedirectToFileResourceHandler. (Closed)

Created:
4 years ago by Randy Smith (Not in Mondays)
Modified:
3 years, 11 months ago
Reviewers:
*mmenke, Charlie Harrison
CC:
chromium-reviews, loading-reviews_chromium.org, jam, darin-cc_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Add logging for request blocking by the RedirectToFileResourceHandler. BUG=None Committed: https://crrev.com/521af15b4e629ad6c9fdad74ec5299cd868ed64a Cr-Commit-Position: refs/heads/master@{#441260}

Patch Set 1 #

Patch Set 2 : Include unblocks. #

Patch Set 3 : Unblock before calling into later ResourceHandlers. #

Patch Set 4 : Shifted over to asserting suspension on resume. #

Total comments: 2

Patch Set 5 : Sync to p440510 #

Patch Set 6 : Re-inserted did_defer_ DCHECK. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+16 lines, -10 lines) Patch
M content/browser/loader/redirect_to_file_resource_handler.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M content/browser/loader/redirect_to_file_resource_handler.cc View 1 2 3 4 5 7 chunks +15 lines, -9 lines 2 comments Download

Messages

Total messages: 37 (26 generated)
Randy Smith (Not in Mondays)
It seems like this is worth the minimal amount of time to throw the CL ...
4 years ago (2016-12-16 22:30:45 UTC) #2
Randy Smith (Not in Mondays)
On 2016/12/16 22:30:45, Randy Smith - Not in Mondays wrote: > It seems like this ...
4 years ago (2016-12-17 22:01:43 UTC) #11
Randy Smith (Not in Mondays)
Ready for review: PTAL? Charles, I'm afraid you're now an optional reviewer, since there are ...
4 years ago (2016-12-20 18:36:12 UTC) #21
mmenke
This seems like a good idea. I believe I didn't add this in the first ...
3 years, 11 months ago (2017-01-03 20:38:31 UTC) #22
Randy Smith (Not in Mondays)
Good point; thanks for questioning me on the DCHECK. Any other thoughts? https://codereview.chromium.org/2586543003/diff/60001/content/browser/loader/redirect_to_file_resource_handler.cc File content/browser/loader/redirect_to_file_resource_handler.cc ...
3 years, 11 months ago (2017-01-03 22:43:59 UTC) #25
mmenke
On 2017/01/03 22:43:59, Randy Smith - Not in Mondays wrote: > Good point; thanks for ...
3 years, 11 months ago (2017-01-03 22:44:54 UTC) #26
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/2586543003/100001
3 years, 11 months ago (2017-01-04 00:08:16 UTC) #30
commit-bot: I haz the power
Committed patchset #6 (id:100001)
3 years, 11 months ago (2017-01-04 00:14:25 UTC) #33
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/521af15b4e629ad6c9fdad74ec5299cd868ed64a Cr-Commit-Position: refs/heads/master@{#441260}
3 years, 11 months ago (2017-01-04 00:16:52 UTC) #35
mmenke
https://codereview.chromium.org/2586543003/diff/100001/content/browser/loader/redirect_to_file_resource_handler.cc File content/browser/loader/redirect_to_file_resource_handler.cc (right): https://codereview.chromium.org/2586543003/diff/100001/content/browser/loader/redirect_to_file_resource_handler.cc#newcode319 content/browser/loader/redirect_to_file_resource_handler.cc:319: Resume(); Randy: This looks like a bug to me: ...
3 years, 11 months ago (2017-01-06 17:56:17 UTC) #36
Randy Smith (Not in Mondays)
3 years, 11 months ago (2017-01-09 21:55:27 UTC) #37
Message was sent while issue was closed.
https://codereview.chromium.org/2586543003/diff/100001/content/browser/loader...
File content/browser/loader/redirect_to_file_resource_handler.cc (right):

https://codereview.chromium.org/2586543003/diff/100001/content/browser/loader...
content/browser/loader/redirect_to_file_resource_handler.cc:319: Resume();
On 2017/01/06 17:56:17, mmenke wrote:
> Randy:  This looks like a bug to me:
> 
> If this is called from OnReadCompleted, and BufIsFull(), we set did_defer_ to
> true in OnReadCompleted before calling this method.  Then if we write the
entire
> buffer synchronously in this loop, we end up here (write_cursor_ ==
> buf_->offset(), !buf_write_pending_, BufIsFull() are all true)....And then we
> call Resume().  But we haven't yet deferred the request!
> 
> Am I missing something?  This issue existed before this CL.

Nice catch.  This looks like a bug in RTFRH, but not one that is going to be
tripped--at least, it looks to me as if writer_->Write() below will always
return either an error or ERR_IO_PENDING, which means we'll never go around the
loop.   I've filed http://crbug.com/679483 to track it, but I don't think we
need to fix it with high priority (unless I'm missing a synchronous return path
from the called functions).

Powered by Google App Engine
This is Rietveld 408576698