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

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

Issue 2850503005: Call resolveLibraryMetadata only when dart:mirrors are loaded (Closed)
Patch Set: Created 3 years, 8 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/compiler.dart
diff --git a/pkg/compiler/lib/src/compiler.dart b/pkg/compiler/lib/src/compiler.dart
index 1766574ff5b4ebae5da04cc49ee60ef8e3526348..a346a95e52ba5c3a3a06951be6aecc17ffdaa899 100644
--- a/pkg/compiler/lib/src/compiler.dart
+++ b/pkg/compiler/lib/src/compiler.dart
@@ -552,7 +552,9 @@ abstract class Compiler {
}
}
}
- resolveLibraryMetadata();
+ if (commonElements.mirrorsLibrary != null) {
+ resolveLibraryMetadata();
+ }
reporter.log('Resolving...');
processQueue(resolutionEnqueuer, mainFunction, libraryLoader.libraries,
@@ -697,7 +699,7 @@ abstract class Compiler {
// resolve metadata classes referenced only from metadata on library tags.
// TODO(ahe): Figure out how to do this lazily.
void resolveLibraryMetadata() {
- if (commonElements.mirrorsLibrary == null) return;
+ assert(commonElements.mirrorsLibrary != null);
for (LibraryElement library in libraryLoader.libraries) {
if (library.metadata != null) {
for (MetadataAnnotation metadata in library.metadata) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698