Fix sanitize
MODIFY
shim/src/sanitize.js
shim/src/sanitize.js
-import { repairAccessors } from "./accessors";
+import { repairAccessors } from './accessors';
+import { repairFunctions } from './functions';
-// locking down the environment
-export function sanitize(sandbox) {
-
- const { confinedWindow: { Object: { prototype: objProto } } } = sandbox;
+// Sanitizing ensures that the neither the legacy
+// accessors nor the function constructors can be
+// used to escape the confinement of the evaluators
+// and execure in the sandbox.
- repairAccessors(objProto);
- // TODO: other steps
+export function sanitize(sandbox) {
+ repairAccessors(sandbox);
+ repairFunctions(sandbox);
}

Fix sanitize