Skip to content

Commit

Permalink
fixup! review suggestion
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Nov 13, 2024
1 parent 81482e7 commit b9c806a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/ses/src/compartment-shim.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@ import { globalThis } from './commons.js';
import { makeCompartmentConstructor } from './compartment.js';
import { tameFunctionToString } from './tame-function-tostring.js';
import { getGlobalIntrinsics } from './intrinsics.js';
import { chooseReporter } from './reporting.js';

const markVirtualizedNativeFunction = tameFunctionToString();

const muteReporter = chooseReporter('none');

// @ts-ignore Compartment is definitely on globalThis.
globalThis.Compartment = makeCompartmentConstructor(
makeCompartmentConstructor,
// TODO pass a proper reporter as second arg to `getGlobalIntrinsics`?
getGlobalIntrinsics(globalThis, console),
// Any reporting that would need to be done should have already been done
// during `lockdown()`.
// See https://github.com/endojs/endo/pull/2624#discussion_r1840979770
getGlobalIntrinsics(globalThis, muteReporter),
markVirtualizedNativeFunction,
);

0 comments on commit b9c806a

Please sign in to comment.