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

compiler: Keep ElementRc valid #5439

Closed
wants to merge 1 commit into from

Conversation

hunger
Copy link
Member

@hunger hunger commented Jun 19, 2024

... instead of breaking it with calling take() in the contents of the Rc.

@ogofart spotted this, thanks!

... instead of breaking it with calling `take()` in the contents of the Rc.

@ogofart spotted this, thanks!
@@ -253,7 +253,7 @@ impl Snapshotter {
r.is_root_component.set(component.is_root_component.get());
*r.embedded_file_resources.borrow_mut() = embedded_file_resources;

*r.root_element.borrow_mut() = root_element.take();
*r.root_element.borrow_mut() = root_element.clone();
Copy link
Member

Choose a reason for hiding this comment

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

I don't think that's right. You must clone the RC, not the element

@hunger
Copy link
Member Author

hunger commented Jun 20, 2024

Closing this as @ogoffart said he is rewritting the root element handling anyway.

@hunger hunger closed this Jun 20, 2024
@hunger hunger deleted the push-yyxzoqwrxqvm branch September 12, 2024 09:38
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.

2 participants