Skip to content

Commit

Permalink
fix(xsnap): freeze API surface
Browse files Browse the repository at this point in the history
  • Loading branch information
dckc committed Feb 23, 2021
1 parent c36f040 commit 8c2cc63
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/xsnap/src/xsnap.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ const importMetaUrl = `file://${__filename}`;
const encoder = new TextEncoder();
const decoder = new TextDecoder();

const { freeze } = Object;

/**
* @param {Uint8Array} arg
* @returns {Uint8Array}
Expand Down Expand Up @@ -276,7 +278,7 @@ export function xsnap(options) {
return vatExit.promise.catch(() => {});
}

return {
return freeze({
issueCommand,
issueStringCommand,
close,
Expand All @@ -285,5 +287,5 @@ export function xsnap(options) {
execute,
import: importModule,
snapshot: writeSnapshot,
};
});
}

0 comments on commit 8c2cc63

Please sign in to comment.