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

[Move] Fix a bug in adapter check_child_object_of_shared_object #2108

Merged
merged 1 commit into from
May 21, 2022

Conversation

lxfind
Copy link
Contributor

@lxfind lxfind commented May 21, 2022

I was under the wrong assumption that resolve_and_type_check can only be called in the transaction execution path where we guarantee every object is properly authenticated.
However it turns out we also call this function when constructing a transaction. And if an owner object is not around at that time, this function will crash because of unwrap.
This PR removes the unwrap.
Also noticed we are using a confusing error for this case. Add a new error for it.

@lxfind lxfind requested review from awelc, tnowacki and patrickkuo May 21, 2022 00:14
Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

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

Yay to managed error semantics!

@lxfind lxfind merged commit 4a9a66a into main May 21, 2022
@lxfind lxfind deleted the move-fix-adapter-crash branch May 21, 2022 15:49
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