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

Issue 2184823006: Call FetchContext::dispatchWillSendRequest() only if an actual load is started (Closed)

Created:
4 years, 4 months ago by hiroshige
Modified:
4 years, 4 months ago
Reviewers:
Nate Chapin, dgozman
CC:
chromium-reviews, caseq+blink_chromium.org, Yoav Weiss, tyoshino+watch_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, gavinp+loader_chromium.org, devtools-reviews_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, sergeyv+blink_chromium.org, Nate Chapin, kozyatinskiy+blink_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Call FetchContext::dispatchWillSendRequest() only if an actual load is started Fixing a regression since [1]. [1] https://codereview.chromium.org/1889973002/ Since [1], FetchContext::dispatchWillSendRequest() was called from ResourceFetcher::willSendRequest() in the middle of ResourceFetcher::requestResource(), and might have modified Resource::m_resourceRequest. However, if the actual loading is deferred, e.g. when FontResource is not used, FetchContext::dispatchWillSendRequest() was called without actual loading, causing stale pending load reports in DevTools. This CL - Moves the ResourceFetcher::willSendRequest() call in requestResource() to ResourceFetcher::startLoad(). Now FetchContext::dispatchWillSendRequest() (called from startLoad()) modifies the local ResourceRequest in startLoad(), not modifying ResourceRequest::m_resourceRequest (which is the behavior before [1]). - Moves setAllowStoredCredentials() call in ResourceFetcher::willSendRequest() to its callsites, because this should be done even when the actual loading is deferred and should modify Resource::m_resourceRequest. - Adds a layout test. BUG=623616, 632580 Committed: https://crrev.com/1b4209891f51609fe5aa84e13be6dd482ca734c7 Cr-Commit-Position: refs/heads/master@{#408588}

Patch Set 1 #

Patch Set 2 : Refactor #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+62 lines, -4 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/inspector/network/font-face.html View 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/network/font-face-expected.txt View 1 chunk +8 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/inspector/network/resources/font-face.html View 1 chunk +17 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp View 1 4 chunks +6 lines, -4 lines 2 comments Download

Messages

Total messages: 14 (7 generated)
hiroshige
PTAL. This should be merged into M-53.
4 years, 4 months ago (2016-07-28 09:58:15 UTC) #4
dgozman
test lgtm
4 years, 4 months ago (2016-07-28 17:03:16 UTC) #5
Nate Chapin
lgtm https://codereview.chromium.org/2184823006/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2184823006/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode993 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:993: ResourceRequest request(resource->resourceRequest()); It'd be nice if we could ...
4 years, 4 months ago (2016-07-28 17:20:37 UTC) #6
hiroshige
https://codereview.chromium.org/2184823006/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp File third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2184823006/diff/20001/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp#newcode993 third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp:993: ResourceRequest request(resource->resourceRequest()); On 2016/07/28 17:20:37, Nate Chapin wrote: > ...
4 years, 4 months ago (2016-07-29 05:59:24 UTC) #8
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/2184823006/20001
4 years, 4 months ago (2016-07-29 05:59:53 UTC) #10
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-07-29 06:03:28 UTC) #12
commit-bot: I haz the power
4 years, 4 months ago (2016-07-29 06:06:19 UTC) #14
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/1b4209891f51609fe5aa84e13be6dd482ca734c7
Cr-Commit-Position: refs/heads/master@{#408588}

Powered by Google App Engine
This is Rietveld 408576698