Index: pkg/front_end/lib/incremental_kernel_generator.dart |
diff --git a/pkg/front_end/lib/incremental_kernel_generator.dart b/pkg/front_end/lib/incremental_kernel_generator.dart |
index 9d52c2188454ffd667f934d7f006ece0d1fd35af..93e88ee60ed5a71e80e0a8deb487779be3eef464 100644 |
--- a/pkg/front_end/lib/incremental_kernel_generator.dart |
+++ b/pkg/front_end/lib/incremental_kernel_generator.dart |
@@ -6,6 +6,7 @@ import 'dart:async'; |
import 'package:front_end/src/base/processed_options.dart'; |
import 'package:front_end/src/incremental_kernel_generator_impl.dart'; |
+import 'package:front_end/src/fasta/compiler_context.dart'; |
import 'package:kernel/kernel.dart'; |
import 'compiler_options.dart'; |
@@ -100,9 +101,11 @@ abstract class IncrementalKernelGenerator { |
CompilerOptions options, Uri entryPoint, |
{WatchUsedFilesFn watch}) async { |
var processedOptions = new ProcessedOptions(options, false, [entryPoint]); |
- var uriTranslator = await processedOptions.getUriTranslator(); |
- return new IncrementalKernelGeneratorImpl( |
- processedOptions, uriTranslator, entryPoint, |
- watch: watch); |
+ return await CompilerContext.runWithOptions(processedOptions, (_) async { |
+ var uriTranslator = await processedOptions.getUriTranslator(); |
+ return new IncrementalKernelGeneratorImpl( |
+ processedOptions, uriTranslator, entryPoint, |
+ watch: watch); |
+ }); |
} |
} |