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

Unified Diff: sky/engine/core/script/dart_controller.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
« no previous file with comments | « no previous file | sky/engine/core/script/dart_loader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/script/dart_controller.cc
diff --git a/sky/engine/core/script/dart_controller.cc b/sky/engine/core/script/dart_controller.cc
index d024c441529794f94be1877265f11337e9cac589..04b03c117f329dbea5da92a91cdc32868e24a421 100644
--- a/sky/engine/core/script/dart_controller.cc
+++ b/sky/engine/core/script/dart_controller.cc
@@ -119,7 +119,9 @@ void DartController::DidLoadMainLibrary(KURL url) {
Dart_Handle library = Dart_LookupLibrary(
StringToDart(dart_state(), url.string()));
- CHECK(!LogIfError(library));
+ // TODO(eseidel): We need to load a 404 page instead!
+ if (LogIfError(library))
+ return;
DartInvokeAppField(library, ToDart("main"), 0, nullptr);
}
« no previous file with comments | « no previous file | sky/engine/core/script/dart_loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698