Chromium Code Reviews
DescriptionCall 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
Review-Url: https://codereview.chromium.org/2184823006
Cr-Commit-Position: refs/heads/master@{#408588}
(cherry picked from commit 1b4209891f51609fe5aa84e13be6dd482ca734c7)
Patch Set 1 #Patch Set 2 : Rebase. #
Messages
Total messages: 1 (0 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||