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

Unified Diff: dart/pkg/docgen/lib/src/generator.dart

Issue 838163002: Ensure packageRoot is non-null in docgen. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 5 years, 11 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: dart/pkg/docgen/lib/src/generator.dart
diff --git a/dart/pkg/docgen/lib/src/generator.dart b/dart/pkg/docgen/lib/src/generator.dart
index 2f1722c87cce4f8109084c2e2a38160878f60f74..7df02600fd71def4975451c2698f20f7711a0342 100644
--- a/dart/pkg/docgen/lib/src/generator.dart
+++ b/dart/pkg/docgen/lib/src/generator.dart
@@ -274,9 +274,10 @@ Future<MirrorSystem> analyzeLibraries(List<Uri> libraries, String
..showWarnings = false).diagnosticHandler;
Uri libraryUri = new Uri.file(appendSlash(libraryRoot));
Uri packageUri = null;
- if (packageRoot != null) {
- packageUri = new Uri.file(appendSlash(packageRoot));
+ if (packageRoot == null) {
+ packageRoot = Platform.packageRoot;
}
+ packageUri = new Uri.file(appendSlash(packageRoot));
return dart2js.analyze(libraries, libraryUri, packageUri,
provider.readStringFromUri, diagnosticHandler, ['--preserve-comments',
'--categories=Client,Server'])..catchError((error) {
« 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