Chromium Code Reviews| Index: dart/site/try/src/compiler_isolate.dart |
| diff --git a/dart/site/try/src/compiler_isolate.dart b/dart/site/try/src/compiler_isolate.dart |
| index 9366aac5697d79bf37805ca1c2726a2631139bb8..d9981b3914f69b16c8a3f6350cf5cb19c4bcede9 100644 |
| --- a/dart/site/try/src/compiler_isolate.dart |
| +++ b/dart/site/try/src/compiler_isolate.dart |
| @@ -9,7 +9,9 @@ import 'dart:html'; |
| import 'dart:isolate'; |
| import 'dart:convert' show JSON; |
| -import '../../../sdk/lib/_internal/compiler/compiler.dart' as compiler; |
| +import 'compilation.dart' show PRIVATE_SCHEME; |
| + |
| +import 'package:compiler/compiler.dart' as compiler; |
| const bool THROW_ON_ERROR = false; |
| @@ -64,9 +66,11 @@ compile(source, SendPort replyTo) { |
| }); |
| charactersRead += value.length; |
| return new Future.value(value); |
| - } else if ('$uri' == 'memory:/main.dart') { |
| + } else if ('$uri' == '$PRIVATE_SCHEME:/main.dart') { |
|
kasperl
2014/03/24 10:32:51
Factor out the '$PRIVATE_SCHEME:/main.dart' string
ahe
2014/03/24 15:20:23
I'm working on getting rid of this code.
|
| charactersRead += source.length; |
| return new Future.value(source); |
| + } else if (uri.scheme == PRIVATE_SCHEME) { |
| + return HttpRequest.getString('project${uri.path}'); |
| } |
| throw new Exception('Error: Cannot read: $uri'); |
| } |
| @@ -81,9 +85,9 @@ compile(source, SendPort replyTo) { |
| throw new Exception('Throw on error'); |
| } |
| } |
| - compiler.compile(Uri.parse('memory:/main.dart'), |
| + compiler.compile(Uri.parse('$PRIVATE_SCHEME:/main.dart'), |
| sdkLocation, |
| - null, |
| + Uri.parse('packages/'), |
| inputProvider, |
| handler, |
| options).then((js) { |