Skip to content

Commit

Permalink
fixup! review suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Feb 2, 2025
1 parent 24d845b commit edd787a
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions packages/SwingSet/tools/run-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,20 +114,11 @@ export const makeRunUtils = (controller, harness) => {
*/
const objTarget = freeze({});

/**
* `freeze` but not `harden` the proxy target so it remains trapping.
* Although a frozen-only object will not be defensive, since it could still
* be made non-trapping, these are encapsulated only within proxies that
* will refuse to be made non-trapping, and so can safely be shared.
* @see https://github.com/endojs/endo/blob/master/packages/ses/docs/preparing-for-stabilize.md
*/
const funcTarget = freeze(() => {});

/** @type {EVProxy} */
// @ts-expect-error cast, approximate
const EV = Object.assign(
presence =>
new Proxy(funcTarget, {
new Proxy(objTarget, {
get: (_t, method, _rx) => {
const boundMethod = (...args) =>
queueAndRun(() =>
Expand All @@ -138,7 +129,7 @@ export const makeRunUtils = (controller, harness) => {
}),
{
vat: vatName =>
new Proxy(funcTarget, {
new Proxy(objTarget, {
get: (_t, method, _rx) => {
const boundMethod = (...args) =>
queueAndRun(() =>
Expand All @@ -148,7 +139,7 @@ export const makeRunUtils = (controller, harness) => {
},
}),
sendOnly: presence =>
new Proxy(funcTarget, {
new Proxy(objTarget, {
get: (_t, method, _rx) => {
const boundMethod = (...args) =>
queueAndRun(
Expand Down

0 comments on commit edd787a

Please sign in to comment.