anchor.diff:        result.completeError(exception, stack);
       }
     });
  +  exitPort.listen((dynamic exitData) {
  +    if (!result.isCompleted) {
  +      result.completeError(Exception('Isolate exited without result or error.'));
  +    }
  +  });
     resultPort.listen((dynamic resultData) {
  -    assert(resultData == null || resultData is R);
  +    assert(resultData is R);
       if (!result.isCompleted)
         result.complete(resultData as R);
     });
  
positive.code: }
  
  Future<void> _spawn<Q, R>(_IsolateConfiguration<Q, FutureOr<R>> configuration) async {
    R result;
    await Timeline.timeSync(
      configuration.debugLabel,
      () async {
        final FutureOr<R> applicationResult = await configuration.apply();
        result = await applicationResult;
      },
      flow: Flow.step(configuration.flowId),
    );
  
negative.code:   final Flow flow = Flow.begin();
    Timeline.startSync('$debugLabel: start', flow: flow);
    final ReceivePort resultPort = ReceivePort();
    final ReceivePort exitPort = ReceivePort();
    final ReceivePort errorPort = ReceivePort();
    Timeline.finishSync();
    final Isolate isolate = await Isolate.spawn<_IsolateConfiguration<Q, FutureOr<R>>>(
  