Comments (6)
No, because Object.isFrozen
is not transitive. If def
stopped at a frozen object, it could miss non-frozen objects that were reachable from named properties of that frozen object:
const bad = Object.freeze([{}]);
// At this point, we have a frozen array containing
// a non-frozen object in its transitive API surface.
def(bad);
If the call to def
succeeds, then the transitive API surface starting at bad
must be frozen. But an isFrozen
check would stop too early.
from endo.
Noting again here that we're likely to change terminology from "deeply frozen" and such to "hardened".
from endo.
can you use Object.isFrozen(obj)
from endo.
In addition to labeling this an "enhancement" I also label it a "bug" because it is a huge performance bug. Normally, if there is no deviation from correct overt behavior I avoid "bug". But the performance shortfall here is huge.
from endo.
This weakmap seems to be global mutable state. Why is that ok in this case?
Also, is it shared between realms? Between calls to require('harden')?
from endo.
This weakmap seems to be global mutable state. Why is that ok in this case?
Also, is it shared between realms? Between calls to require('harden')?
I'm going to open a separate issue to discuss this, I think we have an answer but I don't want to lose visibility when I close this as fixed in a few minutes.
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.