fix(ses): remove code that failed to add species
Fixes
MODIFY
packages/ses/src/tame-global-reg-exp-object.js
packages/ses/src/tame-global-reg-exp-object.js
-const { defineProperties, getOwnPropertyDescriptor } = Object;
+const { defineProperties } = Object;
export default function tameGlobalRegExpObject() {
// Tame the %RegExp% intrinsic.
@@ -17,11 +17,6 @@ export default function tameGlobalRegExpObject() {
return unsafeRegExp(...rest);
};
- // Whitelist static properties.
- // See https://github.com/Agoric/SES-shim/issues/239
- const desc = getOwnPropertyDescriptor(unsafeRegExp, Symbol.species);
- defineProperties(tamedRegExp, Symbol.species, desc);
-
const RegExpPrototype = unsafeRegExp.prototype;
defineProperties(tamedRegExp, {
prototype: { value: RegExpPrototype },

MODIFY
packages/ses/test/tame-global-reg-exp-object.test.js
packages/ses/test/tame-global-reg-exp-object.test.js
@@ -71,6 +71,7 @@ test('tameGlobalRegExpObject - constructor', t => {
const properties = Reflect.ownKeys(RegExp);
t.deepEqual(
properties.sort(),
+ // What about species?
// See https://github.com/Agoric/SES-shim/issues/239
['length', 'name', 'prototype'].sort(),
'RegExp should not have static properties',

fix(ses): remove code that failed to add species

Fixes #239