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

allow Symbol-named methods in virtual/durable objects #5359

Closed
warner opened this issue May 12, 2022 · 0 comments · Fixed by #5395
Closed

allow Symbol-named methods in virtual/durable objects #5359

warner opened this issue May 12, 2022 · 0 comments · Fixed by #5395
Assignees
Labels
enhancement New feature or request SwingSet package: SwingSet
Milestone

Comments

@warner
Copy link
Member

warner commented May 12, 2022

What is the Problem Being Solved?

@erights noticed that virtual objects (defineKind and defineDurableKind) only accept string-named methods in their behavior records. He needs to use Symbol.asyncIterator to build a durable Notifier (#4567).

@FUDCo says this will be pretty easy to do once #2481 is complete.

Description of the Design

defineKindInternal needs to scan the behavior records with something like Reflect.keys or Object.getOwnPropertySymbols instead of / in addition to Object.keys / Object.getOwnPropertyNames, to get all the symbol-named properties too.

Security Considerations

Far/Remotable already have a set of rules about what is/isn't allowed as a property, and we want to be consistent with that, but we already use Far to create the Representatives so worst-case we're too restrictive instead of too liberal.

Test Plan

unit tests

@warner warner added enhancement New feature or request SwingSet package: SwingSet labels May 12, 2022
@mergify mergify bot closed this as completed in #5395 May 20, 2022
@Tartuffo Tartuffo added this to the Mainnet 1 milestone Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request SwingSet package: SwingSet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants