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

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

Issue 11369074: Handle (missing) trailing slash in dartdoc (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 1 month 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: sdk/lib/_internal/compiler/compiler.dart
diff --git a/sdk/lib/_internal/compiler/compiler.dart b/sdk/lib/_internal/compiler/compiler.dart
index 258a8b430d5cb9ee62a2154f00ebf33cd0808c04..3ac9aa5b154e7e5c326a09835aa6600be47eae28 100644
--- a/sdk/lib/_internal/compiler/compiler.dart
+++ b/sdk/lib/_internal/compiler/compiler.dart
@@ -43,6 +43,12 @@ Future<String> compile(Uri script,
ReadStringFromUri provider,
DiagnosticHandler handler,
[List<String> options = const []]) {
+ if (!libraryRoot.path.endsWith("/")) {
+ throw new ArgumentError("Library URI must end with a /");
ahe 2012/11/05 15:58:42 Library URI -> libraryRoot
Johnni Winther 2012/11/05 16:23:29 Done.
+ }
+ if (packageRoot != null && !packageRoot.path.endsWith("/")) {
+ throw new ArgumentError("Package URI must end with a /");
ahe 2012/11/05 15:58:42 Package URI -> packageRoot
Johnni Winther 2012/11/05 16:23:29 Done.
+ }
// TODO(ahe): Consider completing the future with an exception if
// code is null.
Compiler compiler = new Compiler(provider, handler, libraryRoot, packageRoot,

Powered by Google App Engine
This is Rietveld 408576698