From 2ace6d98c0da2c64d650dab02997a019fbeafb89 Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Thu, 30 May 2024 18:40:04 -0700 Subject: [PATCH] add globalThis.VatData.passStyleOf to liveslots-hosted vat environment --- packages/SwingSet/package.json | 1 - packages/SwingSet/test/test-vat-env.js | 1 + packages/swingset-liveslots/src/liveslots.js | 9 +++------ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/packages/SwingSet/package.json b/packages/SwingSet/package.json index 1af7f5eb216..c946369346b 100644 --- a/packages/SwingSet/package.json +++ b/packages/SwingSet/package.json @@ -49,7 +49,6 @@ "@endo/init": "^1.0.4", "@endo/marshal": "^1.3.0", "@endo/nat": "^5.0.4", - "@endo/pass-style": "^1.2.0", "@endo/patterns": "^1.2.0", "@endo/promise-kit": "^1.0.4", "@endo/ses-ava": "^1.1.2", diff --git a/packages/SwingSet/test/test-vat-env.js b/packages/SwingSet/test/test-vat-env.js index 0f1f29c9298..1b422c06a6a 100644 --- a/packages/SwingSet/test/test-vat-env.js +++ b/packages/SwingSet/test/test-vat-env.js @@ -97,6 +97,7 @@ async function testForExpectedGlobals(t, workerType) { 'VatData.makeScalarBigWeakMapStore: function', 'VatData.makeScalarBigSetStore: function', 'VatData.makeScalarBigWeakSetStore: function', + 'VatData.passStyleOf: function', ]); } diff --git a/packages/swingset-liveslots/src/liveslots.js b/packages/swingset-liveslots/src/liveslots.js index 1474a5d0dd5..704ca4e5230 100644 --- a/packages/swingset-liveslots/src/liveslots.js +++ b/packages/swingset-liveslots/src/liveslots.js @@ -1,11 +1,7 @@ /* eslint @typescript-eslint/no-floating-promises: "warn" */ -import { - Remotable, - passStyleOf, - getInterfaceOf, - makeMarshal, -} from '@endo/marshal'; +import { Remotable, getInterfaceOf, makeMarshal } from '@endo/marshal'; import { assert, Fail } from '@agoric/assert'; +import { passStyleOf } from '@endo/pass-style'; import { isPromise } from '@endo/promise-kit'; import { E, HandledPromise } from '@endo/eventual-send'; import { insistVatType, makeVatSlot, parseVatSlot } from './parseVatSlots.js'; @@ -1337,6 +1333,7 @@ function build( makeScalarBigWeakMapStore: collectionManager.makeScalarBigWeakMapStore, makeScalarBigSetStore: collectionManager.makeScalarBigSetStore, makeScalarBigWeakSetStore: collectionManager.makeScalarBigWeakSetStore, + passStyleOf, }, });