ljharb / es-abstract

ECMAScript spec abstract operations.
MIT License
115 stars 30 forks source link

Adapt to override-mistake-fix pattern #115

Closed erights closed 3 years ago

erights commented 3 years ago

Fixes https://github.com/ljharb/object.assign/issues/79

Detect when the getter of an accessor alleges that it was originally a data property. This enables a leaky and cooperative partial emulation of the original data property, as code such as this uses this property to uphold the illusion. See https://github.com/ljharb/object.assign/issues/79 and https://github.com/Agoric/SES-shim/pull/473#issuecomment-697187652

Closes #113. Closes #114.

erights commented 3 years ago

See also https://github.com/Agoric/SES-shim/pull/475

ljharb commented 3 years ago

Good point; es-abstract works on versions of node that lack Symbols entirely. You could do typeof Symbol === 'function' && typeof Symbol.for('function') ? Symbol.for(x) : x in SES, and the same here?

erights commented 3 years ago

Hi @ljharb , ready for review. I will not merge though until https://github.com/Agoric/SES-shim/pull/476 is merged. Thanks.

Attn @kriskowal

erights commented 3 years ago

Hi @ljharb , ready for review. I will not merge though until Agoric/SES-shim#476 is merged. Thanks.

Sorry, habit. I will not merge this one period. It's a pull request.

erights commented 3 years ago

Hi @ljharb , we just published SES 0.10.4 to npm. which contains the override-mistake fix that this PR assumes. It also removes Function.prototype.apply from the whitelist, which was the particular override mistake fix causing trouble. Can we proceed on this? If not, any suggestions? Thanks.

Attn @kriskowal

ljharb commented 3 years ago

I'll add "running SES" to the tests; if they pass with or without this PR (as they should without the apply issue) then we can certainly land this PR as well (ie, once SES tests are verifying it). I'll look into it soon.

erights commented 3 years ago

Thanks!

kumavis commented 3 years ago

thanks for getting this in! @ljharb @erights