Skip to content

Commit

Permalink
fix! stop enabling O.p.constructor
Browse files Browse the repository at this point in the history
  • Loading branch information
erights committed Feb 5, 2021
1 parent bf06c3a commit a5b165b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 7 deletions.
1 change: 0 additions & 1 deletion packages/ses/src/enablements.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@

export const moderateEnablements = {
'%ObjectPrototype%': {
constructor: true, // set by "acorn" v7.
hasOwnProperty: true, // set by "vega-util".
toString: true,
valueOf: true,
Expand Down
7 changes: 1 addition & 6 deletions packages/ses/test/test-enable-property-overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -91,12 +91,7 @@ test('enablePropertyOverrides - on', t => {

harden(intrinsics);

testOverriding(t, 'Object', {}, [
'constructor',
'hasOwnProperty',
'toString',
'valueOf',
]);
testOverriding(t, 'Object', {}, ['hasOwnProperty', 'toString', 'valueOf']);
// We allow 'length' *not* because it is in enablements; it is not;
// but because each array instance has its own.
testOverriding(t, 'Array', [], ['toString', 'length']);
Expand Down

0 comments on commit a5b165b

Please sign in to comment.