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

Unified Diff: sky/engine/core/html/imports/HTMLImportLoader.cpp

Issue 711513003: Make import failures log errors (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase observe-attributes Created 6 years, 1 month 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
« no previous file with comments | « sky/engine/core/frame/FrameConsole.cpp ('k') | sky/tests/mutation-observer/observe-attributes-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/imports/HTMLImportLoader.cpp
diff --git a/sky/engine/core/html/imports/HTMLImportLoader.cpp b/sky/engine/core/html/imports/HTMLImportLoader.cpp
index 22e5b599bc106dc1a677dbc5a99b187963a78ad9..aeafea991c7f526a6e59dede893de2cd3e2fb60d 100644
--- a/sky/engine/core/html/imports/HTMLImportLoader.cpp
+++ b/sky/engine/core/html/imports/HTMLImportLoader.cpp
@@ -81,6 +81,10 @@ void HTMLImportLoader::startLoading(const KURL& url)
void HTMLImportLoader::OnReceivedResponse(mojo::URLResponsePtr response)
{
if (response->error || response->status_code >= 400) {
+ // FIXME: Consider refactoring to use FrameConsole::reportResourceResponseReceived
+ String message = "Failed to load resource: the server responded with a status of " + String::number(response->status_code) + " (" + response->status_line.data() + ')';
+ RefPtr<ConsoleMessage> consoleMessage = ConsoleMessage::create(NetworkMessageSource, ErrorMessageLevel, message, response->url.data());
+ m_controller->master()->addMessage(consoleMessage);
setState(StateError);
return;
}
« no previous file with comments | « sky/engine/core/frame/FrameConsole.cpp ('k') | sky/tests/mutation-observer/observe-attributes-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698