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

Unified Diff: dart/sdk/lib/_internal/compiler/implementation/mirrors_used.dart

Issue 285903006: Fix main handling in dart2js and add tests. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Merged with r38186. Created 6 years, 5 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: dart/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
diff --git a/dart/sdk/lib/_internal/compiler/implementation/mirrors_used.dart b/dart/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
index 27d505cb42e966ca2059da76debe2514f2e1fd9e..e30b95867f081bb60dc3a22be1e1df3b76631d43 100644
--- a/dart/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
+++ b/dart/sdk/lib/_internal/compiler/implementation/mirrors_used.dart
@@ -101,7 +101,7 @@ class MirrorUsageAnalyzerTask extends CompilerTask {
/// Collect @MirrorsUsed annotations in all libraries. Called by the
/// compiler after all libraries are loaded, but before resolution.
void analyzeUsage(LibraryElement mainApp) {
- if (compiler.mirrorsLibrary == null) return;
+ if (mainApp == null || compiler.mirrorsLibrary == null) return;
measure(analyzer.run);
List<String> symbols = analyzer.mergedMirrorUsage.symbols;
List<Element> targets = analyzer.mergedMirrorUsage.targets;

Powered by Google App Engine
This is Rietveld 408576698