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

Unified Diff: lib/runtime/dart_library.js

Issue 1298893003: Enable is and as checks on non-ground types (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Minor fixes Created 5 years, 4 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: lib/runtime/dart_library.js
diff --git a/lib/runtime/dart_library.js b/lib/runtime/dart_library.js
index eb073693cb4d65aacedd2d321f3a5f730a356dca..03d7bf612f946416f4c5cbc8d19e114124a6bbd2 100644
--- a/lib/runtime/dart_library.js
+++ b/lib/runtime/dart_library.js
@@ -48,7 +48,7 @@ var dart_library =
for (let name of list) {
let lib = libraries[name];
if (!lib) {
- dart_utils.throwError('Library not available: ' + name);
+ dart_utils.throwInternalError('Library not available: ' + name);
}
results.push(handler(lib));
}
@@ -58,7 +58,7 @@ var dart_library =
load(inheritedPendingSet) {
// Check for cycles
if (this._state == LibraryLoader.LOADING) {
- dart_utils.throwError('Circular dependence on library: '
+ dart_utils.throwInternalError('Circular dependence on library: '
+ this._name);
} else if (this._state >= LibraryLoader.LOADED) {
return this._library;
@@ -105,7 +105,9 @@ var dart_library =
function import_(libraryName) {
bootstrap();
let loader = libraries[libraryName];
- if (!loader) dart_utils.throwError('Library not found: ' + libraryName);
+ // TODO(vsm): A user might call this directly from JS (as we do in tests).
+ // We may want a different error type.
+ if (!loader) dart_utils.throwInternalError('Library not found: ' + libraryName);
return loader.load();
}
dart_library.import = import_;

Powered by Google App Engine
This is Rietveld 408576698