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

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

Issue 2842253002: Move ReportLocalLoadFailed to ExecutionContext (Closed)
Patch Set: Created 3 years, 8 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/FrameLoader.cpp
diff --git a/third_party/WebKit/Source/core/loader/FrameLoader.cpp b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
index 8a6cdc10ee42dacf58aafdf12a13c0c96e2e86ce..67689242280481d631bcf7b13c443e44b14ce49d 100644
--- a/third_party/WebKit/Source/core/loader/FrameLoader.cpp
+++ b/third_party/WebKit/Source/core/loader/FrameLoader.cpp
@@ -794,7 +794,7 @@ bool FrameLoader::PrepareRequestForThisFrame(FrameLoadRequest& request) {
return false;
if (!request.OriginDocument()->GetSecurityOrigin()->CanDisplay(url)) {
- ReportLocalLoadFailed(frame_, url.ElidedString());
+ frame_->GetDocument()->ReportLocalLoadFailed(url.ElidedString());
return false;
}
@@ -1037,16 +1037,6 @@ SubstituteData FrameLoader::DefaultSubstituteDataForURL(const KURL& url) {
"text/html", "UTF-8", KURL());
}
-void FrameLoader::ReportLocalLoadFailed(LocalFrame* frame, const String& url) {
- DCHECK(!url.IsEmpty());
- if (!frame)
- return;
-
- frame->GetDocument()->AddConsoleMessage(
- ConsoleMessage::Create(kSecurityMessageSource, kErrorMessageLevel,
- "Not allowed to load local resource: " + url));
-}
-
void FrameLoader::StopAllLoaders() {
if (frame_->GetDocument()->PageDismissalEventBeingDispatched() !=
Document::kNoDismissal)

Powered by Google App Engine
This is Rietveld 408576698