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

Unified Diff: third_party/WebKit/Source/core/loader/BaseFetchContext.cpp

Issue 2842253002: Move ReportLocalLoadFailed to ExecutionContext (Closed)
Patch Set: Revert ResourceLoader changes, handle main resource redirect in DocumentLoader Created 3 years, 7 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/loader/BaseFetchContext.cpp
diff --git a/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp b/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp
index 7134f9cfb4d51349a7bc472347142dbb5a177979..748ae933ccb7700b068a49eff7a563c9c8567918 100644
--- a/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp
+++ b/third_party/WebKit/Source/core/loader/BaseFetchContext.cpp
@@ -186,8 +186,10 @@ ResourceRequestBlockedReason BaseFetchContext::CanRequestInternal(
if (origin_restriction != FetchParameters::kNoOriginRestriction &&
security_origin && !security_origin->CanDisplay(url)) {
- if (reporting_policy == SecurityViolationReportingPolicy::kReport)
- ReportLocalLoadFailed(url);
+ if (reporting_policy == SecurityViolationReportingPolicy::kReport) {
+ AddConsoleMessage("Not allowed to load local resource: " +
+ url.GetString());
+ }
RESOURCE_LOADING_DVLOG(1) << "ResourceFetcher::requestResource URL was not "
"allowed by SecurityOrigin::CanDisplay";
return ResourceRequestBlockedReason::kOther;

Powered by Google App Engine
This is Rietveld 408576698