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

package:vm_service Isolate is mutable yet overrides operator == #47347

Open
Hixie opened this issue Oct 1, 2021 · 0 comments
Open

package:vm_service Isolate is mutable yet overrides operator == #47347

Hixie opened this issue Oct 1, 2021 · 0 comments
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. pkg-vm-service

Comments

@Hixie
Copy link
Contributor

Hixie commented Oct 1, 2021

The Isolate class is mutable (e.g. pauseEvent), but has an operator ==. This means that it is possible for two instances of Isolate to compare equal, yet behave differently. This is a potential source of bugs, for example consider if instances of this class are used in a Set or as a key to a Map: the object added to the set or map will not be the same as the object obtained back from the same set or map when iterating over the set or map keys.

@lrhn lrhn added area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. pkg-vm-service labels Oct 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. pkg-vm-service
Projects
None yet
Development

No branches or pull requests

2 participants