Skip to content

Commit

Permalink
fixup(SwingSet): fix saveSnapshot() arguments
Browse files Browse the repository at this point in the history
move uncompressedSizeLoaded into saveSnapshot().
  • Loading branch information
siarhei-agoric committed Feb 7, 2025
1 parent e2ddf83 commit 246a6f6
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,7 @@ export function makeXsSubprocessFactory({
const uncompressedSizeDelta =
uncompressedSizeLoaded &&
metrics.uncompressedSize - uncompressedSizeLoaded;
uncompressedSizeLoaded = snapshotResults.uncompressedSize;
kernelSlog.write({
type: 'heap-snapshot-save',
vatID,
Expand All @@ -265,7 +266,7 @@ export function makeXsSubprocessFactory({
};

if (!restartWorker) {
return saveSnapshot(vatID, snapPos, snapshotStream);
return saveSnapshot();
}

/** @type {AsyncGenerator<Uint8Array, void, void>[]} */
Expand All @@ -291,9 +292,8 @@ export function makeXsSubprocessFactory({
snapshotDescription,
},
}),
saveSnapshot(vatID, snapPos, snapStoreSaveStream),
saveSnapshot(),
]);
uncompressedSizeLoaded = snapshotResults.uncompressedSize;
await closeP;

/** @type {Partial<import('@agoric/swing-store').SnapshotInfo>} */
Expand Down

0 comments on commit 246a6f6

Please sign in to comment.