Skip to content

Commit

Permalink
fix: only shallow freeze needed (#994)
Browse files Browse the repository at this point in the history
  • Loading branch information
erights authored Jan 23, 2022
1 parent b34817b commit edeaf8a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions packages/marshal/src/marshal.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,13 @@ import {

const { ownKeys } = Reflect;
const { isArray } = Array;
const { getOwnPropertyDescriptors, defineProperties, is, fromEntries } = Object;
const {
getOwnPropertyDescriptors,
defineProperties,
is,
fromEntries,
freeze,
} = Object;
const { details: X, quote: q } = assert;

/**
Expand Down Expand Up @@ -222,7 +228,8 @@ export function makeMarshal(
const result = harden({
[QCLASS]: 'hilbert',
original: encode(qclassValue),
rest: encode(harden(rest)),
// See https://github.com/Agoric/agoric-sdk/issues/4313
rest: encode(freeze(rest)),
});
return result;
}
Expand Down

0 comments on commit edeaf8a

Please sign in to comment.