New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 702845 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug

Blocking:
issue gerrit:5670



Sign in to add a comment

Preload doesn't match for a crossdomain XHR

Project Member Reported by vikt...@google.com, Mar 18 2017

Issue description

Chrome Version: 57.0.2987.98 (Official Build) (64-bit)
OS: OSX, but likely all.

What steps will reproduce the problem?

JSBIN: http://jsbin.com/miqoxad/edit?html,js,output

(1) Preload something with MIME application/json, crossdomain, using as=""
(2) Fetch or XHR same resource

What is the expected result?

Single network request happens.

What happens instead?

Multiple network requests happen.
Also there's a console warning:
> "The resource [] was preloaded using link preload but not used within a few seconds from the window's load event. Please make sure it wasn't preloaded for nothing."


Please use labels and text to provide additional information.

Forked from https://bugs.chromium.org/p/gerrit/issues/detail?id=5670#c10
 
Cc: igrigo...@chromium.org yhirano@chromium.org
Components: Blink>Network>XHR Blink>Network>FetchAPI
Owner: y...@yoav.ws
Status: Assigned (was: Untriaged)
Description: Show this description

Comment 3 by logan@google.com, Mar 22 2017

Blocking: gerrit:5670

Comment 4 by y...@yoav.ws, Mar 23 2017

Cc: mkwst@chromium.org
Looking into that issue, it seems like the `corsEnabled` ResourceLoaderOption is not turned on for XHRs, but is turned on for preloads when the crossorigin attribute is set. IIUC, this option is enabled by `setCrossOriginAccessControl()` which seems to be called for all CORS enabled fetches except for XHR.

Turning it on for XHRs would be easy, and seems to solve this issue, but I'm not sure that's the right thing to do, and that it won't have other implications.

Talking to yhirano@ on #chromium, it seems like this flag is not turned on for XHR intentionally, in order to avoid CORS handling in both DocumentThreadableLoader and ResourceLoader.

Maybe the right path here is to exempt XHR from the corsEnabled check in ResourceLoaderOptions::canReuseRequest() ?
Cc: tyoshino@chromium.org kinuko@chromium.org
The *right* fix is to unify CORS handling in ResourceLoader and DocumentThreadableLoader, but it is not easy...

Comment 6 by mkwst@chromium.org, Mar 23 2017

Cc: jochen@chromium.org
yhirano@: FYI, Jochen has an intern coming in this summer that was interested in chipping away at the `ResourceLoader`/`DocumentThreadableLoader` divide, as it makes some things like HSTS Priming and CORS-RFC1918 harder to implement. I don't think we have a solid design for that in mind, however, but it's probably worth syncing with Jochen if y'all have something sketched out.
Cc: horo@chromium.org
Thank you for the information. It's great news!

cc-ing horo@ as ServiceWorker code is involved as well.

Comment 8 by kinuko@chromium.org, Mar 23 2017

Yeah sounds like a great news :D

Comment 9 by y...@yoav.ws, Mar 23 2017

Can/should we wait till the summer for this? Or is there a quick (yet safe) workaround? (such as bypassing the CORS checks under some conditions)
> #4, #9

I think the condition should consult ResourceRequest::m_fetchRequestMode.

Comment 11 by addyo@chromium.org, Mar 29 2017

Cc: addyo@chromium.org
Any update here on ownership?

Comment 13 by y...@yoav.ws, May 15 2017

I'm hoping to get to it soon, but if anyone beats me to it, feel free to change owners. No hard feelings whatsoever :)
I have an idea to implement this feature without much code change. I'm not 100% confident but it might work. Let me try.
Project Member

Comment 15 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b713f98459a136191cd7f8b503c43733ec17e055

commit b713f98459a136191cd7f8b503c43733ec17e055
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Fri Jul 14 06:11:33 2017

Remove Platform::CancelledError

It was needed because we couldn't use net errors in blink. We can use them
now.

Bug:  702845 
Change-Id: I76ce587a437e6c64810de0b0b8d6894951162037
Reviewed-on: https://chromium-review.googlesource.com/571562
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#486690}
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/content/child/blink_platform_impl.cc
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/content/child/blink_platform_impl.h
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/content/child/web_url_loader_impl.cc
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/content/child/web_url_request_util.cc
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/content/child/web_url_request_util.h
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/content/renderer/render_frame_impl.cc
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/third_party/WebKit/Source/platform/exported/WebURLError.cpp
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/third_party/WebKit/Source/platform/loader/fetch/ResourceError.cpp
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/third_party/WebKit/Source/platform/loader/fetch/ResourceError.h
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.cpp
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/third_party/WebKit/Source/platform/loader/testing/FetchTestingPlatformSupport.h
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.cpp
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/third_party/WebKit/Source/platform/testing/TestingPlatformSupport.h
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/third_party/WebKit/public/platform/Platform.h
[modify] https://crrev.com/b713f98459a136191cd7f8b503c43733ec17e055/third_party/WebKit/public/platform/WebURLError.h

Project Member

Comment 16 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c4d634b5762b6bed66142515d5124ad412068a64

commit c4d634b5762b6bed66142515d5124ad412068a64
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Tue Jul 18 04:10:13 2017

Stop creating blink internal ResourceError in DocumentThreadableLoader

...and use ResourceError::CancelledDueToAccessControlCheck instead.

This change is needed to make DocumentThreadableLoader consistent with
ResourceLoader regarding security checks.

Bug:  702845 
Change-Id: Idfd0b9451d91ddaeea2e18cbcbdee0c955242e48
Reviewed-on: https://chromium-review.googlesource.com/569943
Reviewed-by: Bill Budge <bbudge@chromium.org>
Reviewed-by: Mounir Lamouri <mlamouri@chromium.org>
Reviewed-by: Kinuko Yasuda <kinuko@chromium.org>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487382}
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/components/nacl/renderer/manifest_downloader.cc
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/content/browser/manifest/manifest_browsertest.cc
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/fast/xmlhttprequest/xmlhttprequest-no-file-access-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/eventsource/eventsource-cors-basic-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/eventsource/eventsource-cors-non-http-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/eventsource/eventsource-cors-redirect-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/eventsource/eventsource-cors-with-credentials-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/eventsource/workers/eventsource-cors-basic-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/eventsource/workers/eventsource-cors-non-http-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/eventsource/workers/eventsource-cors-redirect-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/eventsource/workers/eventsource-cors-with-credentials-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/fetch/chromium/error-messages-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/inspector/console-xhr-logging-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/inspector/network-preflight-options-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/inspector/network/network-disable-cache-cors-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/security/isolatedWorld/cross-origin-xhr-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-fetch-failure-output-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/security/suborigins/crossorigin/suborigin-cors-xhr-failure-output-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-and-redirects-async-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-and-redirects-async-same-origin-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-and-redirects-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-basic-denied-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-basic-denied-preflight-cache-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-basic-get-fail-non-simple-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-basic-non-simple-deny-cached-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-basic-post-fail-non-simple-content-type-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-async-header-denied-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-async-method-denied-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-async-not-supported-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-invalid-status-301-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-invalid-status-400-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-request-invalid-status-501-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-sync-header-denied-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-sync-method-denied-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-preflight-sync-not-supported-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-repeated-failed-preflight-crash-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/access-control-sandboxed-iframe-denied-without-wildcard-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-origin-no-credential-prompt-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-origin-unsupported-url-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-site-denied-response-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-site-denied-response-sync-2-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/cross-site-denied-response-sync-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/onerror-event-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/ontimeout-event-override-after-failure-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/open-in-body-onload-sync-to-invalid-cross-origin-response-handling-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/open-in-body-onload-sync-to-invalid-preflight-handling-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/open-in-body-onload-sync-to-invalid-redirect-response-handling-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/07-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/08-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/09-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/10-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/11-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/12-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/13-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/14-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/15-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/16-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/17-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/18-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/19-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/20-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/21-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/22-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/23-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/24-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/25-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/26-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/27-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/28-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/29-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/30-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/31-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/32-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/33-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/34-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/35-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/36-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/37-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/38-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/39-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/40-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/41-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/42-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/43-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/44-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/45-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/46-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-exact-matching/47-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-whitelisting-https-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-whitelisting-ip-addresses-with-subdomains-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/origin-whitelisting-removal-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-async-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/post-blob-content-type-sync-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-2-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-post-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/redirect-cross-origin-tripmine-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-post-sync-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/simple-cross-origin-denied-events-sync-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/simple-cross-origin-progress-events-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/upload-request-error-event-order-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/workers/access-control-basic-get-fail-non-simple-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/workers/cross-origin-unsupported-url-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-sync-no-progress-events-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/xmlhttprequest-unsafe-redirect-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/LayoutTests/virtual/off-main-thread-fetch/http/tests/xmlhttprequest/workers/cross-origin-unsupported-url-expected.txt
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/Source/modules/eventsource/EventSource.cpp
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/Source/platform/exported/WebURLError.cpp
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/Source/platform/loader/fetch/ResourceError.cpp
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/Source/platform/loader/fetch/ResourceError.h
[modify] https://crrev.com/c4d634b5762b6bed66142515d5124ad412068a64/third_party/WebKit/public/platform/WebURLError.h

Project Member

Comment 17 by bugdroid1@chromium.org, Jul 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c482fb32069aca187783ca0153e5d9bc806b00f3

commit c482fb32069aca187783ca0153e5d9bc806b00f3
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Tue Jul 18 07:27:31 2017

Remove ThreadableLoaderClient::DidFailAccessControlCheck

This is needed to keep CORS handling in DocumentThredableLoader consistent
with that in ResourceLoader.

Bug:  702845 
Change-Id: Iee73902e0941fb234aca3c60d996f9c75634222d
Reviewed-on: https://chromium-review.googlesource.com/571343
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487411}
[modify] https://crrev.com/c482fb32069aca187783ca0153e5d9bc806b00f3/third_party/WebKit/Source/core/loader/DocumentThreadableLoader.cpp
[modify] https://crrev.com/c482fb32069aca187783ca0153e5d9bc806b00f3/third_party/WebKit/Source/core/loader/ThreadableLoaderClient.h
[modify] https://crrev.com/c482fb32069aca187783ca0153e5d9bc806b00f3/third_party/WebKit/Source/core/loader/ThreadableLoaderTest.cpp
[modify] https://crrev.com/c482fb32069aca187783ca0153e5d9bc806b00f3/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.cpp
[modify] https://crrev.com/c482fb32069aca187783ca0153e5d9bc806b00f3/third_party/WebKit/Source/core/loader/WorkerThreadableLoader.h
[modify] https://crrev.com/c482fb32069aca187783ca0153e5d9bc806b00f3/third_party/WebKit/Source/modules/eventsource/EventSource.cpp
[modify] https://crrev.com/c482fb32069aca187783ca0153e5d9bc806b00f3/third_party/WebKit/Source/modules/eventsource/EventSource.h
[modify] https://crrev.com/c482fb32069aca187783ca0153e5d9bc806b00f3/third_party/WebKit/Source/modules/fetch/BlobBytesConsumerTest.cpp
[modify] https://crrev.com/c482fb32069aca187783ca0153e5d9bc806b00f3/third_party/WebKit/Source/modules/fetch/FetchManager.cpp

Project Member

Comment 18 by sheriffbot@chromium.org, Jul 24 2017

Labels: Hotlist-Google
Project Member

Comment 19 by bugdroid1@chromium.org, Aug 1 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/be3378b59121a88c5852cc38b108b7e73a411682

commit be3378b59121a88c5852cc38b108b7e73a411682
Author: Yutaka Hirano <yhirano@chromium.org>
Date: Tue Aug 01 13:09:56 2017

Support crossorigin preload with as=fetch

Supporting <link rel="preload" as="fetch" crossorigin> was considered
to be hard because we have two CORS handling logic. CORS for preload
is checked in ResourceLoader and CORS for xhr is checked in
DocumentThreadableLoader. Resource::CanReuse is a function that
determines whether we can reuse a resource for a request, and it
returns false in such a case.

On the other hand, it should be safe to run the CORS check twice. If
the CORS check for the existing resource is run in ResourceLoader, we
can reuse it for an XHR request. This CL changes Resource::CanReuse in
that sense.

Bug:  702845 
Change-Id: Ifa5580c4465ff683e65455256266cbeeecde3d92
Reviewed-on: https://chromium-review.googlesource.com/582063
Commit-Queue: Yutaka Hirano <yhirano@chromium.org>
Reviewed-by: Takeshi Yoshino <tyoshino@chromium.org>
Cr-Commit-Position: refs/heads/master@{#490957}
[modify] https://crrev.com/be3378b59121a88c5852cc38b108b7e73a411682/third_party/WebKit/LayoutTests/TestExpectations
[modify] https://crrev.com/be3378b59121a88c5852cc38b108b7e73a411682/third_party/WebKit/Source/platform/loader/fetch/Resource.cpp

Owner: yhirano@chromium.org
Status: Fixed (was: Assigned)

Sign in to add a comment