| Index: Source/bindings/dart/DartApplicationLoader.cpp
|
| diff --git a/Source/bindings/dart/DartApplicationLoader.cpp b/Source/bindings/dart/DartApplicationLoader.cpp
|
| index b95a191319c4a7f126210f81ff878f7ece6b4e37..0892f7e3bf0ae35391ee6d5521e08f820ec6be76 100644
|
| --- a/Source/bindings/dart/DartApplicationLoader.cpp
|
| +++ b/Source/bindings/dart/DartApplicationLoader.cpp
|
| @@ -101,7 +101,11 @@ Dart_Handle DartApplicationLoader::libraryTagHandlerCallback(Dart_LibraryTag tag
|
|
|
| Dart_Handle DartApplicationLoader::libraryTagHandler(Dart_LibraryTag tag, Dart_Handle library, Dart_Handle urlHandle, String url)
|
| {
|
| - ASSERT(m_asyncLoader->contains(url));
|
| + if (!m_asyncLoader->contains(url)) {
|
| + scriptLoadError(url);
|
| + return Dart_NewBoolean(false);
|
| + }
|
| +
|
| const String& source = m_asyncLoader->get(url);
|
|
|
| Dart_Handle import;
|
| @@ -111,6 +115,7 @@ Dart_Handle DartApplicationLoader::libraryTagHandler(Dart_LibraryTag tag, Dart_H
|
| import = Dart_LoadSource(library, DartUtilities::stringToDartString(url), DartUtilities::convertSourceString(source));
|
| } else {
|
| ASSERT_NOT_REACHED();
|
| + m_scriptHasError = true;
|
| DartUtilities::reportProblem(m_originDocument, "Invalid import tag");
|
| return Dart_NewBoolean(false);
|
| }
|
| @@ -260,6 +265,7 @@ Dart_Handle DartApplicationLoader::topLevelLibrary()
|
|
|
| void DartApplicationLoader::scriptLoadError(String failedUrl)
|
| {
|
| + m_scriptHasError = true;
|
| // FIXME: try to dig out line number, -1 for now.
|
| if (failedUrl.startsWith(String("dart:"))) {
|
| m_originDocument->logExceptionToConsole(String("The built-in library '") + failedUrl + String("' is not available on Dartium."), m_libraryUrl, -1, 0, 0);
|
|
|