Skip to content

Commit

Permalink
fix(swingset): add placeholders for upgrade/stopvat work
Browse files Browse the repository at this point in the history
This makes room inside processUpgradeVat() for the new cleanup steps
that we want to add.

refs #6650
refs #7001
refs #6694
refs #6696
  • Loading branch information
warner authored and gibson042 committed Mar 4, 2023
1 parent 6af1746 commit cfd8c75
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions packages/SwingSet/src/kernel/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -823,6 +823,11 @@ export default function buildKernel(
const vd1 = vatWarehouse.kernelDeliveryToVatDelivery(vatID, kd1);
const status1 = await deliverAndLogToVat(vatID, kd1, vd1);

// TODO: send BOYD to the vat, to give it one last chance to clean
// up, drop imports, and delete durable data. If we ever have a
// vat that is so broken it can't do BOYD, we can make that
// optional. #7001

// make arguments for vat-vat-admin.js vatUpgradeCallback()
/**
* @param {SwingSetCapData} _errorCD
Expand Down Expand Up @@ -873,8 +878,17 @@ export default function buildKernel(
return results;
}

// stopVat succeeded, so now we stop the worker, delete the
// transcript and any snapshot
// stopVat succeeded. finish cleanup on behalf of the worker.

// TODO: walk c-list for all decided promises, reject them all #6694

// TODO: getNonDurableObjectExports, synthesize abandonVSO,
// execute it as if it were a syscall. (maybe distinguish between
// reachable/recognizable exports, abandon the reachable, retire
// the recognizable) #6696

// cleanup done, now we stop the worker, delete the transcript and
// any snapshot

await vatWarehouse.resetWorker(vatID);
const source = { bundleID };
Expand Down

0 comments on commit cfd8c75

Please sign in to comment.