Use constructor instead of ad-hoc objects for various `Ref`s

This commit is contained in:
Tony Garnock-Jones 2024-03-28 12:40:25 +01:00
parent 90aa9656ca
commit 85b2299061
2 changed files with 4 additions and 5 deletions

View File

@ -223,7 +223,7 @@ export class Facet {
const h = nextHandle++;
const e = {
handle: h,
peer: { relay: other, target: new StopOnRetract() },
peer: new Ref(other, new StopOnRetract()),
crossSpace: null,
established: true,
};

View File

@ -55,10 +55,9 @@ export class Membrane {
}
}
export const INERT_REF: Ref = {
relay: Actor.boot(() => Turn.active.stop(Turn.activeFacet)).root,
target: {},
};
export const INERT_REF = new Ref(
Actor.boot(() => Turn.active.stop(Turn.activeFacet)).root,
{});
export interface ProxyInbound {
proxyPacket(packet: IO.Packet<Embedded<WireRef>>): void;