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

Issue 2207833002: 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:
CC:
chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@2785
Target Ref:
refs/pending/branch-heads/2785
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 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. #

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 4 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 1 (0 generated)
hiroshige
4 years, 4 months ago (2016-08-03 07:38:53 UTC) #1
Message was sent while issue was closed.
Committed:
    Review URL: https://codereview.chromium.org/2207833002 .
    
    Cr-Commit-Position: refs/branch-heads/2785@{#480}
    Cr-Branched-From:
68623971be0cfc492a2cb0427d7f478e7b214c24-refs/heads/master@{#403382}

Powered by Google App Engine
This is Rietveld 408576698