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

Unified Diff: third_party/WebKit/Source/core/html/HTMLMediaElement.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/html/HTMLMediaElement.cpp
diff --git a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
index 06b542b35315441d29edc68e7cd91fa9824c0c6f..d88856ddeffcdc4a47c7bec3675a5e1801cd5b09 100644
--- a/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
+++ b/third_party/WebKit/Source/core/html/HTMLMediaElement.cpp
@@ -1413,8 +1413,11 @@ bool HTMLMediaElement::IsSafeToLoadURL(const KURL& url,
LocalFrame* frame = GetDocument().GetFrame();
if (!frame || !GetDocument().GetSecurityOrigin()->CanDisplay(url)) {
- if (action_if_invalid == kComplain)
- FrameLoader::ReportLocalLoadFailed(frame, url.ElidedString());
+ if (action_if_invalid == kComplain) {
+ GetDocument().AddConsoleMessage(ConsoleMessage::Create(
+ kSecurityMessageSource, kErrorMessageLevel,
+ "Not allowed to load local resource: " + url.ElidedString()));
+ }
BLINK_MEDIA_LOG << "isSafeToLoadURL(" << (void*)this << ", "
<< UrlForLoggingMedia(url)
<< ") -> FALSE rejected by SecurityOrigin";

Powered by Google App Engine
This is Rietveld 408576698