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

Issue 2395313002: Revert of Make ResourceFetcher return Resources with LoadError instead of nullptrs. (Closed)

Created:
4 years, 2 months ago by nasko
Modified:
4 years, 2 months ago
Reviewers:
Nate Chapin, alexmos, engedy
CC:
chromium-reviews, tyoshino+watch_chromium.org, Yoav Weiss, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, Nate Chapin, Mike West, clamy, jkarlin, Charlie Reis, ncarter (slow)
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Revert of Make ResourceFetcher return Resources with LoadError instead of nullptrs. (patchset #8 id:160001 of https://codereview.chromium.org/2231523002/ ) Reason for revert: Reverting since it is causing flakiness on the blink bots. Latest flake: https://build.chromium.org/p/chromium.webkit/builders/WebKit%20Win7%20%28dbg%29/builds/7628 unexpected_failures: http/tests/security/contentSecurityPolicy/nonces/import-enforce-blocked.php Original issue's description: > Make ResourceFetcher return Resources with LoadError instead of nullptrs. > > Before this change, when a request was immediately blocked by access checks, > ResourceFetcher::requestResource() would return a nullptr, while returning a > Resource instance with a LoadError set if the request was blocked only after > following one or more redirects. This resulted in various resource types > failing in inconsistent ways in the two cases. > > This CL makes this behavior consistent by making requestResource() always > return a Resource instance with a LoadError. This allows for cleaner and more > consistent handling of errors in ResourceClients, as wells as more flexibility > should the client choose to distinguish the underlying causes of errors. Due > to the infrequency of requests failing access checks during normal use, the > performance impact should be negligible. > > BUG=616234 > > Committed: https://crrev.com/fd02740210e0152c94bd4c34a1e355280421730d > Cr-Commit-Position: refs/heads/master@{#423358} TBR=japhet@chromium.org,alexmos@chromium.org,engedy@chromium.org # Skipping CQ checks because original CL landed less than 1 days ago. NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=616234

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+54 lines, -104 lines) Patch
M third_party/WebKit/LayoutTests/fast/dom/resources/frame-loading-via-document-write.js View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/image-blocked-src-change.html View 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/misc/image-blocked-src-no-change.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/style-enforce-blocked.php View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/nonces/style-multiple-blocked.php View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/register-bypassing-scheme-partial.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/require-sri-for/require-sri-for-style-blocked.php View 1 chunk +1 line, -2 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic.html View 7 chunks +17 lines, -29 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-whitelist.html View 1 chunk +6 lines, -10 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/style-blocked.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/local-image-from-remote.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-async-post-xhr-blocked-expected.txt View 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/resources/frame-loading-via-document-write.js View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/svg-image-with-cached-remote-image.html View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/LayoutTests/http/tests/security/svg-image-with-cached-remote-image-expected.html View 1 chunk +2 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/Resource.cpp View 2 chunks +6 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.h View 1 chunk +0 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp View 2 chunks +2 lines, -13 lines 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp View 1 chunk +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/loader/DocumentLoader.cpp View 2 chunks +2 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/core/xmlhttprequest/XMLHttpRequest.cpp View 1 chunk +1 line, -6 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebDocumentSubresourceFilterTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 chunk +1 line, -4 lines 0 comments Download

Messages

Total messages: 9 (3 generated)
nasko
Created Revert of Make ResourceFetcher return Resources with LoadError instead of nullptrs.
4 years, 2 months ago (2016-10-06 22:16:08 UTC) #2
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/2395313002/1
4 years, 2 months ago (2016-10-06 22:16:37 UTC) #3
commit-bot: I haz the power
Failed to apply patch for third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-whitelist.html: While running git apply --index -3 -p1; error: third_party/WebKit/LayoutTests/http/tests/security/contentSecurityPolicy/script-src-strict-dynamic-whitelist.html: ...
4 years, 2 months ago (2016-10-06 22:17:29 UTC) #5
engedy
Looks like the file in question was modified by this CL: https://codereview.chromium.org/2401573003.
4 years, 2 months ago (2016-10-06 22:20:45 UTC) #6
engedy
Another CL was created manually to perform the revert, due to conflicts: https://codereview.chromium.org/2399243002.
4 years, 2 months ago (2016-10-12 08:50:33 UTC) #8
engedy
4 years, 2 months ago (2016-10-12 08:51:54 UTC) #9
Message was sent while issue was closed.
For clarity, I haven't made any changes now, just documenting what happened 5
days ago.

Powered by Google App Engine
This is Rietveld 408576698