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

Unified Diff: pkg/compiler/tool/generate_kernel.dart

Issue 2982093003: Unifying compiler context (Closed)
Patch Set: revert change to kernel-service.dart Created 3 years, 5 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
Index: pkg/compiler/tool/generate_kernel.dart
diff --git a/pkg/compiler/tool/generate_kernel.dart b/pkg/compiler/tool/generate_kernel.dart
index 2ed2aa2680b5f8b6f947ea5ca6a5c445cd7ba8d9..1414ad549bbda460636d000fc3413b6d70d6883b 100644
--- a/pkg/compiler/tool/generate_kernel.dart
+++ b/pkg/compiler/tool/generate_kernel.dart
@@ -23,8 +23,8 @@ main(List<String> args) async {
..target = new Dart2jsTarget(new TargetFlags())
..packagesFileUri = Uri.base.resolve('.packages')
..compileSdk = true
- ..linkedDependencies = [Uri.base.resolve(flags['platform'])]
- ..onError = errorHandler;
+ ..setExitCodeOnProblem = true
+ ..linkedDependencies = [Uri.base.resolve(flags['platform'])];
if (flags.rest.isEmpty) {
var script = relativizeUri(Platform.script);
@@ -39,11 +39,6 @@ main(List<String> args) async {
await writeProgramToBinary(program, flags['out']);
}
-void errorHandler(CompilationError e) {
- exitCode = 1;
- print(e.message);
-}
-
ArgParser _argParser = new ArgParser()
..addOption('platform',
help: 'location of the precompiled dart2js sdk',

Powered by Google App Engine
This is Rietveld 408576698