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

Unified Diff: pkg/compiler/lib/src/apiimpl.dart

Issue 2321973002: Make dart2js not consider dart:io there if the library is unsupported. (Closed)
Patch Set: Address comment Created 4 years, 3 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 | tests/language/conditional_import_string_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/apiimpl.dart
diff --git a/pkg/compiler/lib/src/apiimpl.dart b/pkg/compiler/lib/src/apiimpl.dart
index 3bddb9b64661d9ba16578556a1c10f8843561b83..dbff8dfefb0bb81bb8d3804c509280c33506afcd 100644
--- a/pkg/compiler/lib/src/apiimpl.dart
+++ b/pkg/compiler/lib/src/apiimpl.dart
@@ -381,7 +381,9 @@ class _Environment implements Environment {
// Private libraries are not exposed to the users.
if (libraryName.startsWith("_")) return null;
- if (compiler.resolvedUriTranslator.sdkLibraries.containsKey(libraryName)) {
+ Uri libraryUri =
+ compiler.resolvedUriTranslator.sdkLibraries[libraryName];
+ if (libraryUri != null && libraryUri.scheme != "unsupported") {
// Dart2js always "supports" importing 'dart:mirrors' but will abort
// the compilation at a later point if the backend doesn't support
// mirrors. In this case 'mirrors' should not be in the environment.
« no previous file with comments | « no previous file | tests/language/conditional_import_string_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698