Skip to content

Commit

Permalink
fix: allow vats under SwingSet to unwrap their promises
Browse files Browse the repository at this point in the history
Use @agoric/make-promise to make Promises that can be unwrapped
(currently via the HandledPromise shim, but that may change).
  • Loading branch information
michaelfig committed Mar 14, 2020
1 parent d84ee30 commit f2be5c7
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 48 deletions.
1 change: 1 addition & 0 deletions packages/SwingSet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
"@agoric/evaluate": "^2.2.0",
"@agoric/eventual-send": "^0.5.0",
"@agoric/harden": "^0.0.4",
"@agoric/make-promise": "^0.0.1",
"@agoric/marshal": "^0.1.1",
"@agoric/nat": "^2.0.1",
"@agoric/swing-store-simple": "^0.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/devices/command.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Nat from '@agoric/nat';
import makePromise from '../makePromise';
import makePromise from '@agoric/make-promise';

export default function buildCommand(broadcastCallback) {
if (!broadcastCallback) {
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/kernel/kernel.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import harden from '@agoric/harden';
import { makeMarshal } from '@agoric/marshal';
import evaluateProgram from '@agoric/evaluate';
import { assert, details } from '@agoric/assert';
import makePromise from '@agoric/make-promise';
import makeVatManager from './vatManager';
import { makeLiveSlots } from './liveSlots';
import { makeDeviceSlots } from './deviceSlots';
import makePromise from '../makePromise';
import makeDeviceManager from './deviceManager';
import { wrapStorage } from './state/storageWrapper';
import makeKernelKeeper from './state/kernelKeeper';
Expand Down
2 changes: 1 addition & 1 deletion packages/SwingSet/src/kernel/vatAdmin/vatAdminWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* device affordances into objects that can be used by code in other vats.
*/
import harden from '@agoric/harden';
import makePromise from '../../makePromise';
import makePromise from '@agoric/make-promise';

export default function setup(syscall, state, helpers) {
function build(E, D) {
Expand Down
45 changes: 0 additions & 45 deletions packages/SwingSet/src/makePromise.js

This file was deleted.

0 comments on commit f2be5c7

Please sign in to comment.