mirror of
https://github.com/dart-lang/sdk
synced 2024-09-04 16:03:44 +00:00
[kernel_worker] retry on failure
Workaround for https://github.com/dart-lang/sdk/issues/36644 See similar for dartdevc: https://dart-review.googlesource.com/c/sdk/+/99442 Change-Id: Id02549a7bd8110b4691a724fa8930ede477464f8 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/99735 Commit-Queue: Vijay Menon <vsm@google.com> Reviewed-by: Jake Macdonald <jakemac@google.com>
This commit is contained in:
parent
284a299543
commit
43eebea5a3
|
@ -53,11 +53,24 @@ class KernelWorker extends AsyncWorkerLoop {
|
|||
} else {
|
||||
previousState = null;
|
||||
}
|
||||
var result = await computeKernel(request.arguments,
|
||||
isWorker: true,
|
||||
outputBuffer: outputBuffer,
|
||||
inputs: request.inputs,
|
||||
previousState: previousStateToPass);
|
||||
ComputeKernelResult result;
|
||||
// TODO(vsm): See https://github.com/dart-lang/sdk/issues/36644.
|
||||
// If the CFE is crashing with previous state, then clear compilation
|
||||
// state and try again.
|
||||
try {
|
||||
result = await computeKernel(request.arguments,
|
||||
isWorker: true,
|
||||
outputBuffer: outputBuffer,
|
||||
inputs: request.inputs,
|
||||
previousState: previousStateToPass);
|
||||
} catch (_) {
|
||||
outputBuffer.clear();
|
||||
result = await computeKernel(request.arguments,
|
||||
isWorker: true,
|
||||
outputBuffer: outputBuffer,
|
||||
inputs: request.inputs,
|
||||
previousState: null);
|
||||
}
|
||||
previousState = result.previousState;
|
||||
if (!result.succeeded) {
|
||||
response.exitCode = 15;
|
||||
|
|
Loading…
Reference in a new issue