delete dead function deepFreezePrimordials
change imports to match, now that 'deepFreeze' is the default export of
deepFreeze.js
MODIFY
src/bundle/createSES.js
src/bundle/createSES.js
@@ -19,7 +19,7 @@ import tameError from './tame-error';
import tameRegExp from './tame-regexp';
import removeProperties from './removeProperties';
import getAnonIntrinsics from './anonIntrinsics';
-import { deepFreeze } from './deepFreeze';
+import deepFreeze from './deepFreeze';
import hardenPrimordials from './hardenPrimordials';
import whitelist from './whitelist';
import makeConsole from './make-console';

MODIFY
src/bundle/deepFreeze.js
src/bundle/deepFreeze.js
// https://github.com/google/caja/blob/master/src/com/google/caja/ses/repairES5.js
// then copied from proposal-frozen-realms deep-freeze.js
-export function deepFreeze(root) {
+export default function deepFreeze(root) {
const { freeze, getOwnPropertyDescriptors, getPrototypeOf } = Object;
const { ownKeys } = Reflect;
@@ -114,14 +114,3 @@ export function deepFreeze(root) {
innerDeepFreeze(root);
return root;
}
-
-export function deepFreezePrimordials(global) {
- const primordialRoots = {
- global,
- // todo: add other roots, to reach the
- // unreachables/"anonIntrinsics": see
- // whitelist.js for a list
- // anonIntrinsics: getAnonIntrinsics(global)
- };
- deepFreeze(primordialRoots);
-}

MODIFY
src/bundle/def.js
src/bundle/def.js
// See the License for the specific language governing permissions and
// limitations under the License.
-import { deepFreeze } from './deepFreeze';
+import deepFreeze from './deepFreeze';
export default function def(node) {
// TODO HACK return a shallow freeze unless Object.prototype is frozen.

delete dead function deepFreezePrimordials

change imports to match, now that 'deepFreeze' is the default export of
deepFreeze.js