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

Issue 2420603003: Make DocumentThreadableLoader's cross origin logic clearer in terms of layering (Closed)

Created:
4 years, 2 months ago by tyoshino (SeeGerritForStatus)
Modified:
4 years, 1 month ago
Reviewers:
Mike West
CC:
blink-reviews, chromium-reviews, gavinp+loader_chromium.org, Nate Chapin, loading-reviews_chromium.org, loading-reviews+fetch_chromium.org, tyoshino+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Make DocumentThreadableLoader's cross origin logic clearer in terms of layering - Call removeCredentials() on ResourceRequest before invoking the CrossOriginPreflightResultCache's canSkipPreflight to determine the final request to send after possible preflight. But generate the referrer and origin header right before loadRequest(). It looks this would fix a possible bug that canSkipPreflight() always returns false due to setHTTPReferrer() call when m_didRedirect is true. - Rename m_didRedirect to m_overrideReferrer as it's set only when the redirect was cross origin. Not always. - Eliminate the unnecessary loadActualRequest() invocation on the path where we don't issue a preflight. - Let createAccessControlPreflightRequest() just DCHECK() on the passed URL instead of calling removeCredentials() separately. It's better to just depend on the input |request| as the role of the preflight is to check that the |request| can be accepted by the server. R=mkwst@chromium.org BUG=427429, 641620, 557621 Committed: https://crrev.com/5eba3e9043b40c4a0b051123a364f2c97dfdf088 Cr-Commit-Position: refs/heads/master@{#430543}

Patch Set 1 #

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+65 lines, -60 lines) Patch
M third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.h View 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/CrossOriginAccessControl.cpp View 1 2 chunks +7 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/FetchRequest.cpp View 1 1 chunk +12 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentThreadableLoader.h View 1 2 chunks +3 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp View 1 7 chunks +43 lines, -38 lines 0 comments Download

Messages

Total messages: 18 (12 generated)
tyoshino (SeeGerritForStatus)
4 years, 2 months ago (2016-10-13 15:36:16 UTC) #6
Mike West
This looks clearer to me. Thanks, and apologies for the delayed review. I missed this ...
4 years, 1 month ago (2016-10-26 16:26:57 UTC) #9
tyoshino (SeeGerritForStatus)
On 2016/10/26 16:26:57, Mike West wrote: > This looks clearer to me. Thanks, and apologies ...
4 years, 1 month ago (2016-11-08 06:02:08 UTC) #10
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/2420603003/20001
4 years, 1 month ago (2016-11-08 06:03:01 UTC) #14
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 1 month ago (2016-11-08 07:56:33 UTC) #16
commit-bot: I haz the power
4 years, 1 month ago (2016-11-08 07:59:25 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/5eba3e9043b40c4a0b051123a364f2c97dfdf088
Cr-Commit-Position: refs/heads/master@{#430543}

Powered by Google App Engine
This is Rietveld 408576698