Skip to content

Commit 8c2cc63

Browse files
committed
fix(xsnap): freeze API surface
1 parent c36f040 commit 8c2cc63

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/xsnap/src/xsnap.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@ const importMetaUrl = `file://${__filename}`;
3232
const encoder = new TextEncoder();
3333
const decoder = new TextDecoder();
3434

35+
const { freeze } = Object;
36+
3537
/**
3638
* @param {Uint8Array} arg
3739
* @returns {Uint8Array}
@@ -276,7 +278,7 @@ export function xsnap(options) {
276278
return vatExit.promise.catch(() => {});
277279
}
278280

279-
return {
281+
return freeze({
280282
issueCommand,
281283
issueStringCommand,
282284
close,
@@ -285,5 +287,5 @@ export function xsnap(options) {
285287
execute,
286288
import: importModule,
287289
snapshot: writeSnapshot,
288-
};
290+
});
289291
}

0 commit comments

Comments
 (0)