Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: newly missing fars #3557

Merged
merged 1 commit into from
Jul 29, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/SwingSet/test/virtualObjects/vat-vom-gc-bob.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* global makeKind */
import { E } from '@agoric/eventual-send';
import { Far } from '@agoric/marshal';

const things = [];

Expand All @@ -20,7 +21,7 @@ export function buildRootObject(_vatPowers) {
const thingMaker = makeKind(makeThingInstance);
let nextThingNumber = 0;

return harden({
return Far('root', {
prepare() {
things.push(null);
for (let i = 1; i <= 9; i += 1) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { E } from '@agoric/eventual-send';
import { Far } from '@agoric/marshal';

export function buildRootObject(_vatPowers) {
let other;
let bob;
let me;
let goCount = 3;
return harden({
return Far('root', {
async bootstrap(vats) {
me = vats.bootstrap;
bob = vats.bob;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Far } from '@agoric/marshal';

const log = console.log;

export function buildRootObject(_vatPowers) {
Expand All @@ -7,7 +9,7 @@ export function buildRootObject(_vatPowers) {
return `Bob's thing answer`;
},
};
return harden({
return Far('root', {
getThing() {
log('=> Bob: in getThing(), reply with thing');
return thing;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Far } from '@agoric/marshal';

function makePR() {
let r;
const p = new Promise((resolve, _reject) => {
Expand All @@ -9,7 +11,7 @@ function makePR() {
export function buildRootObject(_vatPowers) {
let p;
let r;
return harden({
return Far('root', {
genPromise() {
[p, r] = makePR();
return p;
Expand Down
3 changes: 2 additions & 1 deletion packages/swingset-runner/demo/vatStore3/bootstrap.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { E } from '@agoric/eventual-send';
import { Far } from '@agoric/marshal';

export function buildRootObject(_vatPowers) {
let other;
let bob;
let me;
let goCount = 3;
return harden({
return Far('root', {
async bootstrap(vats) {
me = vats.bootstrap;
bob = vats.bob;
Expand Down
3 changes: 2 additions & 1 deletion packages/swingset-runner/demo/vatStore3/vat-bob.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/* global makeKind */
import { E } from '@agoric/eventual-send';
import { Far } from '@agoric/marshal';

const things = [];

Expand All @@ -20,7 +21,7 @@ export function buildRootObject(_vatPowers) {
const thingMaker = makeKind(makeThingInstance);
let nextThingNumber = 0;

return harden({
return Far('root', {
prepare() {
for (let i = 1; i <= 9; i += 1) {
things.push(thingMaker(`thing #${i}`));
Expand Down