Index: pkg/compiler/lib/src/js_backend/backend_helpers.dart |
diff --git a/pkg/compiler/lib/src/js_backend/backend_helpers.dart b/pkg/compiler/lib/src/js_backend/backend_helpers.dart |
index 5a84725c122e4965c5d73a04b3df13ced54d74a8..dc5bb125993360269a9a850b666a834355a452f1 100644 |
--- a/pkg/compiler/lib/src/js_backend/backend_helpers.dart |
+++ b/pkg/compiler/lib/src/js_backend/backend_helpers.dart |
@@ -347,8 +347,9 @@ class BackendHelpers { |
// [LinkedHashMap] is reexported from dart:collection and can therefore not |
// be loaded from dart:core in [onLibraryScanned]. |
- mapLiteralClass = compiler.coreLibrary.find('LinkedHashMap'); |
- assert(invariant(compiler.coreLibrary, mapLiteralClass != null, |
+ mapLiteralClass = compiler.commonElements.coreLibrary.find('LinkedHashMap'); |
+ assert(invariant( |
+ compiler.commonElements.coreLibrary, mapLiteralClass != null, |
message: "Element 'LinkedHashMap' not found in 'dart:core'.")); |
// TODO(kasperl): Some tests do not define the special JSArray |
@@ -621,7 +622,7 @@ class BackendHelpers { |
} |
Element get syncCompleterConstructor { |
- ClassElement classElement = find(compiler.asyncLibrary, "Completer"); |
+ ClassElement classElement = find(asyncLibrary, "Completer"); |
classElement.ensureResolved(resolution); |
return classElement.lookupConstructor("sync"); |
} |
@@ -638,7 +639,7 @@ class BackendHelpers { |
} |
Element get streamIteratorConstructor { |
- ClassElement classElement = find(compiler.asyncLibrary, "StreamIterator"); |
+ ClassElement classElement = find(asyncLibrary, "StreamIterator"); |
classElement.ensureResolved(resolution); |
return classElement.lookupConstructor(""); |
} |