Chromium Code Reviews| 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, |