Skip to content

Commit

Permalink
fix(swingset): comms: deleteKernelMapping might free the object
Browse files Browse the repository at this point in the history
Just like in `deleteRemoteMapping`, `deleteKernelMapping` needs to mark the
lref for refcount checking, to handle the case where the comms vat imports an
object from the kernel, drops it, and then the kernel drives the retirement
process (with a `dispatch.retireImport`).
  • Loading branch information
warner committed Jun 20, 2021
1 parent e97a21d commit a3bf097
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions packages/SwingSet/src/vats/comms/state.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,10 @@ export function makeState(syscall, identifierBase = 0) {
if (type === 'object') {
if (isImport) {
removeImporter(lref, 'kernel');
} else {
// deleting the upstream/export-side mapping should trigger
// processMaybeFree
lrefMightBeFree(lref);
}
}
}
Expand Down

0 comments on commit a3bf097

Please sign in to comment.