Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WeakRef, FinalizationGroup to start compartment only #551

Open
erights opened this issue Dec 23, 2020 · 3 comments
Open

Add WeakRef, FinalizationGroup to start compartment only #551

erights opened this issue Dec 23, 2020 · 3 comments
Assignees
Labels
kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 permits Issues pertaining to SES’s permits for properties of shared intrinsics

Comments

@erights
Copy link
Contributor

erights commented Dec 23, 2020

They are now standard, reality, and needed by the Agoric platform. They are powerful and should be added to the start compartment only, and only to the initialGlobalPropertyNames whitelist.

WeakRef.prototype.constructor should be an InertWeakRef constructor, or at least a powerless one, so that WeakRef instances do not grant the ability to observe more than can be observed with that one instance.

There's probably a similar need for an InertFinalizationGroup but more thought is needed.

@erights erights self-assigned this Feb 26, 2021
@erights erights added the permits Issues pertaining to SES’s permits for properties of shared intrinsics label Jun 25, 2021
@erights
Copy link
Contributor Author

erights commented Dec 26, 2022

See See Agoric/agoric-sdk#1931

@kriskowal
Copy link
Member

Please reöpen if this issue persists, but under the current regime, lockdown() does not delete these globals from the realm / start compartment. They are omitted from the default global of child compartments.

@erights
Copy link
Contributor Author

erights commented Jan 10, 2024

They are simply omitted from the shared intrinsics. Arguably, they should be treated more like Function or Date, with a shared prototype pointing at an inert constructor. Low priority, but worth revisiting, so reopening.

@erights erights reopened this Jan 10, 2024
@kriskowal kriskowal added the kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 label Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kriskowal-review-2024-01 Issues that kriskowal wants to bring to the attention of the team for review as of January, 2024 permits Issues pertaining to SES’s permits for properties of shared intrinsics
Projects
None yet
Development

No branches or pull requests

3 participants