-
Notifications
You must be signed in to change notification settings - Fork 80
Description
What is the Problem Being Solved?
We are looking at making harden usable before lockdown, which entails no recursing into prototypes in that case (see #1686).
It is also best practice to explicitly harden prototypes before any instances, as to not leave a window where some object that will ultimately be shared remain unhardened.
We cannot enforce that pre or post lockdown harden has prototypes pre-hardened as that would be a breaking change, and a lockdown compatibility hazard. However we could warn when post-lockdown calls of harden implicitly harden a prototype.
Description of the Design
Build a list of prototype objects that are discovered during property walk. When processing the prototypes, warn if the prototype objects isn't already hardened.
Note: a prototype object may be hardened simultaneously if discovered by property walk, in which case it shouldn't be on the list of potential prototype objects.
Security Considerations
None I can think of, should increase best practice to harden early
Scaling Considerations
Shouldn't significantly increase the ephemeral object tracking harden already does.
Test Plan
TBD
Compatibility Considerations
We should probably make this an option, possibly on by default.
Upgrade Considerations
None, can be done before or after #1686