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

[[HostDefined]] Improvements #3460

Merged
merged 2 commits into from
Nov 10, 2023

Commits on Nov 10, 2023

  1. Refactor the [[HostDefined]] implementation.

    Currently `[[HostDefined]]` doesn't permit you to mutably borrow two objects from the `[[HostDefined]]` field since the `FxHashMap` is wrapped under a `GcRefCell`.
    
    This commit implements a `get_mut_many` (from `hashbrown`'s `HashMap`) method to permit accessing several `NativeObject`s using a `NativeTuple`.
    
    Additionally, this commit takes the opportunity to provide automatic downcasting on the `insert` and `remove` methods for `[[HostDefined]]`.
    johnyob committed Nov 10, 2023
    Configuration menu
    Copy the full SHA
    a5d9d9c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    022ee6a View commit details
    Browse the repository at this point in the history