Comments (13)
At https://github.com/Agoric/SES/blob/master/src/index.js there is a commented out call to tamperProofDataProperties
but the only thing I could find is https://github.com/tc39/proposal-frozen-realms/blob/master/shim/src/mutable.js which is to a much earlier version. Where is the code containing the tamperProofDataProperties
we used to call?
from endo.
@bmeck @littledan , where is a good place to track this issue? Could you reply with a link? Thanks.
from endo.
Sorry. By "this issue" I mean the attempt to fix the override mistake in the EcmaScript spec, which is only distantly related to this issue. Nevertheless, it would be nice to have a link here. Thanks.
from endo.
tc39/ecma262#1320 is probably the best place currently as it deals w/ the spec changes 1307 can probably closed in lieu of it.
from endo.
Hi @jfparadis , did you say that your data suggested we only need this repair on
Object.prototype
, Function.prototype
, RegExpr.prototype? What about
Array.prototype`? Others?
For the prototypes we do repair, which properties should we repair?
from endo.
Here is the current list:
Object.prototype
Array.prototype
Function.prototype
Error.prototype
from endo.
Thanks.
Do you have any data on which properties on these prototypes could remain unrepaired?
from endo.
All prototype properties of Object and Array need to me repaired because arrays are often used as objects, and any property can be set on objects to allow compatibility.
For the rest, we can only repair Function 'name' and Error 'message'.
from endo.
found tamperProofDataProperties
- first as
tamper-proof.js
https://github.com/tc39/proposal-ses/commits/master/shim/src/tamper-proof.js - then renamed
shim/src/tamper-proof.js → shim/src/mutable.js
which is as markm posted above saying it was a "much earlier version"
After finding the history, I think mutable.js
is actually the newer version.
from endo.
After finding the history, I think mutable.js is actually the newer version.
Newer than tamper-proof.js, yes. But not the newest. Waiting from responses from @caridy @jdalton @jfparadis @guybedford @bmeck
from endo.
node is currently using https://github.com/nodejs/node/blob/554ffa34320ebfe62e6eefd4607483866362efd3/lib/internal/freeze_intrinsics.js#L253 but can align with w/e is preferred.
from endo.
I like the name enableDerivedOverride
. Anyone see what the other differences are?
from endo.
After finding the history, I think mutable.js is actually the newer version.
Newer than tamper-proof.js, yes. But not the newest. Waiting from responses from @caridy @jdalton @jfparadis @guybedford @bmeck
@erights Commenting as requested by @caridy - Salesforce's Locker uses a customized version of mutable.js
, with some prototypes commented out:
[
i.ObjectPrototype,
i.ArrayPrototype
// i.BooleanPrototype,
// i.DatePrototype,
// i.NumberPrototype,
// i.StringPrototype,
// i.IteratorPrototype,
// i.ArrayIteratorPrototype,
// i.PromisePrototype,
// i.DataViewPrototype,
// i.TypedArray,
// i.Int8ArrayPrototype,
// i.Int16ArrayPrototype,
// i.Int32ArrayPrototype,
// i.Uint8Array,
// i.Uint16Array,
// i.Uint32Array
],
For these prototypes we apply beMutable
to the name
property only:
[
i.FunctionPrototype,
i.GeneratorPrototype,
i.AsyncFunctionPrototype,
i.AsyncGeneratorPrototype
],
And for these prototypes we apply beMutable
to the message
property only:
[
i.ErrorPrototype,
i.EvalErrorPrototype,
i.RangeErrorPrototype,
i.ReferenceErrorPrototype,
i.SyntaxErrorPrototype,
i.TypeErrorPrototype,
i.URIErrorPrototype
],
from endo.
Related Issues (20)
- support subpath pattern exports
- Add a note about required `compilerOptions.lib` or `compilerOptions.target` to SES readme
- Compartment mapper should take first matching of conditional exports HOT 1
- drop matrix from the lint job
- "Checker" parameters would be more ergonomic as "Rejectors" HOT 6
- cli: Add `copy` command
- cli: Add common command aliases
- Daemon: Guests able to evaluate, makeBundle, storeValue, and storeBlob
- `endo make` leaves behind temp bundle if `make()` result is bad HOT 1
- Generate bundles with untransformed original sources instead of precompiled sources.
- Document CopySet/CopyTagged
- Make `void` HOT 4
- custom parser support
- feat(compartment-mapper): Collect unused module descriptors
- Time to switch CI from Node 21 to Node 22?
- atob() return is not limited to ASCII HOT 1
- Promise Kit Empty README
- importing @endo/errors without importing SES HOT 1
- compartment-mapper build fails with pnpm
- ses: source maps
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from endo.