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

Restrict ClosureFunction to only Copy closures #1518

Merged
merged 1 commit into from
Aug 28, 2021

Conversation

jedel1043
Copy link
Member

This Pull Request fixes/closes #1515.

It changes the following:

  • Refactors ClosureFunction into a proper trait, with an additional Copy bound.
  • Replaces Rc<ClosureFunction> with Box<dyn ClosureFunction> inside Function.
  • Documents parts of the function module.

Copy link
Member

@Razican Razican left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks pretty good! I will check a bit more what dyn_clone does :)

boa/src/builtins/function/mod.rs Outdated Show resolved Hide resolved
@Razican Razican added this to the v0.13.0 milestone Aug 27, 2021
@HalidOdat HalidOdat merged commit f9a82b4 into boa-dev:master Aug 28, 2021
@jedel1043 jedel1043 deleted the copy_closures branch August 28, 2021 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Moving a JsObject inside a closure causes a panic
3 participants