Skip to content

Commit

Permalink
feat(swingset): provide name to xsnap via managerOptions
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Mar 30, 2021
1 parent 5b31c23 commit 78b428d
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions packages/SwingSet/src/kernel/loadVat.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ export function makeVatLoader(stuff) {
liveSlotsConsole: makeVatConsole('ls', vatID),
vatParameters,
virtualObjectCacheSize,
name,
};
// TODO: We need to support within-vat metering (for the Spawner) until
// #1343 is fixed, after which we can remove
Expand Down
1 change: 1 addition & 0 deletions packages/SwingSet/src/kernel/vatManager/factory.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ export function makeVatManagerFactory({
'virtualObjectCacheSize',
'vatParameters',
'vatConsole',
'name',
]);
const { setup, bundle, enableSetup = false } = managerOptions;
assert(setup || bundle);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export function makeXsSubprocessFactory({
vatParameters,
virtualObjectCacheSize,
enableDisavow,
name,
} = managerOptions;
assert(!managerOptions.metered, 'xs-worker: metered not supported yet');
assert(
Expand Down Expand Up @@ -127,7 +128,7 @@ export function makeXsSubprocessFactory({
}

// start the worker and establish a connection
const { worker, bundles } = startXSnap(`${vatID}`, handleCommand);
const { worker, bundles } = startXSnap(`${vatID}:${name}`, handleCommand);
for await (const [it, superCode] of Object.entries(bundles)) {
parentLog(vatID, 'eval bundle', it);
assert(
Expand Down
1 change: 1 addition & 0 deletions packages/SwingSet/src/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
* enableDisavow?: boolean,
* vatParameters: Record<string, unknown>,
* virtualObjectCacheSize: number,
* name?: string,
* } & (HasBundle | HasSetup)} ManagerOptions
*/

Expand Down

0 comments on commit 78b428d

Please sign in to comment.