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

Issue 984213002: CORS errors print error twice on preload. (Closed)

Created:
5 years, 9 months ago by jww
Modified:
5 years, 9 months ago
Reviewers:
Yoav Weiss
CC:
blink-reviews, tyoshino+watch_chromium.org, Nate Chapin, gavinp+loader_chromium.org, Mike West
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

CORS errors print error twice on preload. Error messages on CORS checks in the ResourceFetcher did not discriminate between preload scans and normal resource requests. Thus, if there was a CORS failure and a preload for the resource was done, two error messages would be printed to the console for the same failure. This fix adds a check to canAccessResource in ResourceFetcher to make sure that Blink is not in a preload scan when an error message is printed. BUG=464876

Patch Set 1 #

Patch Set 2 : Add test #

Patch Set 3 : Added delay to cors-script.php #

Unified diffs Side-by-side diffs Delta from patch set Stats (+47 lines, -3 lines) Patch
A LayoutTests/http/tests/security/preload-script-crossorigin-fails-cross-origin.html View 1 2 1 chunk +38 lines, -0 lines 0 comments Download
A + LayoutTests/http/tests/security/preload-script-crossorigin-fails-cross-origin-expected.txt View 1 1 chunk +3 lines, -1 line 0 comments Download
M LayoutTests/http/tests/security/resources/cors-script.php View 1 2 1 chunk +3 lines, -0 lines 0 comments Download
M Source/core/fetch/ResourceFetcher.cpp View 2 chunks +3 lines, -2 lines 0 comments Download

Messages

Total messages: 12 (2 generated)
jww
5 years, 9 months ago (2015-03-06 22:58:27 UTC) #2
Yoav Weiss
On 2015/03/06 22:58:27, jww wrote: Awesome! :) Can you add a test for that making ...
5 years, 9 months ago (2015-03-06 23:06:11 UTC) #3
jww
5 years, 9 months ago (2015-03-07 08:07:16 UTC) #4
Yoav Weiss
On 2015/03/07 08:07:16, jww wrote: Almost :) Can you add some delay to cors-script.php as ...
5 years, 9 months ago (2015-03-07 15:28:04 UTC) #5
jww
I'll add that to cors-script.php. I actually did write the test initially using testharness, but ...
5 years, 9 months ago (2015-03-07 16:25:30 UTC) #6
jww
On 2015/03/07 16:25:30, jww wrote: > I'll add that to cors-script.php. > > I actually ...
5 years, 9 months ago (2015-03-07 18:32:48 UTC) #7
Yoav Weiss
On 2015/03/07 18:32:48, jww wrote: > On 2015/03/07 16:25:30, jww wrote: > > I'll add ...
5 years, 9 months ago (2015-03-07 18:38:09 UTC) #8
jww
Cool, will do. If I get a good answer there I'll rewrite the test. Thanks! ...
5 years, 9 months ago (2015-03-07 18:40:36 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/984213002/40001
5 years, 9 months ago (2015-03-07 18:41:14 UTC) #11
commit-bot: I haz the power
5 years, 9 months ago (2015-03-08 22:43:52 UTC) #12
Message was sent while issue was closed.
Committed patchset #3 (id:40001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=191498

Powered by Google App Engine
This is Rietveld 408576698