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

Unified Diff: sky/engine/core/script/dart_loader.cc

Issue 1182633002: Don't crash when main.dart is a 404. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Passes presubmit Created 5 years, 6 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: sky/engine/core/script/dart_loader.cc
diff --git a/sky/engine/core/script/dart_loader.cc b/sky/engine/core/script/dart_loader.cc
index 773637a59789831f3d890e495baa385abf130375..f6efdb363dcf6bdc1cba3eba81363fe0d569fbe9 100644
--- a/sky/engine/core/script/dart_loader.cc
+++ b/sky/engine/core/script/dart_loader.cc
@@ -239,6 +239,11 @@ void DartLoader::WaitForDependencies(
}
void DartLoader::LoadLibrary(const KURL& url, mojo::URLResponsePtr response) {
+ if (response && response->status_code >= 400) {
+ LOG(ERROR) << url.string().utf8().data()
+ << " failed with " << response->status_code;
+ }
+
const auto& result = pending_libraries_.add(url.string(), nullptr);
if (result.isNewEntry) {
OwnPtr<Job> job = adoptPtr(new ImportJob(this, url));
« no previous file with comments | « sky/engine/core/script/dart_controller.cc ('k') | sky/services/oknet/src/org/domokit/oknet/UrlLoaderImpl.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698