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

Unified Diff: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp

Issue 2399243002: Revert of Make ResourceFetcher return Resources with LoadError instead of nullptrs. (patchset #8 id… (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
diff --git a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
index 5148237632f9e90a4be11e45ba063ce0cbd0ff40..86dd768cf188192259897d2c31b182c6612a9847 100644
--- a/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
+++ b/third_party/WebKit/Source/core/fetch/ResourceFetcher.cpp
@@ -432,15 +432,6 @@ Resource* ResourceFetcher::resourceForStaticData(
return resource;
}
-Resource* ResourceFetcher::resourceForBlockedRequest(
- const FetchRequest& request,
- const ResourceFactory& factory) {
- Resource* resource = factory.create(request.resourceRequest(),
- request.options(), request.charset());
- resource->error(ResourceError::cancelledDueToAccessCheckError(request.url()));
- return resource;
-}
-
void ResourceFetcher::moveCachedNonBlockingResourceToBlocking(
Resource* resource,
const FetchRequest& request) {
@@ -504,10 +495,8 @@ Resource* ResourceFetcher::requestResource(
factory.type(), request.resourceRequest(),
MemoryCache::removeFragmentIdentifierIfNeeded(request.url()),
request.options(), request.forPreload(),
- request.getOriginRestriction())) {
- DCHECK(!substituteData.forceSynchronousLoad());
- return resourceForBlockedRequest(request, factory);
- }
+ request.getOriginRestriction()))
+ return nullptr;
unsigned long identifier = createUniqueIdentifier();
request.mutableResourceRequest().setPriority(computeLoadPriority(
« no previous file with comments | « third_party/WebKit/Source/core/fetch/ResourceFetcher.h ('k') | third_party/WebKit/Source/core/fetch/ResourceFetcherTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698