Workaround for dartbug.com/36983 also when not in incremental compiler

When invoking the kernel worker in worker mode, reusing previous state,
but not using the incremental compiler, we will currently leak,
see dartbug.com/36983.
This was previously fixed in the incremental compiler case, but this CL
moves the fix outside the if to fix it in every configuration.

Change-Id: I993fecbcc053d2bca64af9e65d270f75411f2e68
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/103626
Reviewed-by: Kevin Millikin <kmillikin@google.com>
This commit is contained in:
Jens Johansen 2019-05-27 10:46:18 +00:00
parent e19bcb9411
commit ec3cd7ffe0

View file

@ -295,8 +295,6 @@ Future<ComputeKernelResult> computeKernel(List<String> args,
return Future.value(fe.serializeComponent(incrementalComponent));
});
state.options.onDiagnostic = null; // See http://dartbug.com/36983.
} else if (summaryOnly) {
kernel = await fe.compileSummary(state, sources, onDiagnostic,
includeOffsets: false);
@ -309,6 +307,7 @@ Future<ComputeKernelResult> computeKernel(List<String> args,
: null,
includeOffsets: true);
}
state.options.onDiagnostic = null; // See http://dartbug.com/36983.
if (kernel != null) {
var outputFile = new File(parsedArgs['output']);