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

[child effects refactor] Cleanup protocol config checks #21186

Merged
merged 2 commits into from
Feb 14, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ impl<'a> ChildObjectStore<'a> {
));
};

let mut value = if let Some(ChildObject { ty, value, .. }) = self.store.remove(&child) {
let mut value = if let Some(ChildObject { value, .. }) = self.store.remove(&child) {
if value.exists()? {
return Err(
PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR)
Expand All @@ -595,20 +595,7 @@ impl<'a> ChildObjectStore<'a> {
),
);
}
if self.inner.protocol_config.loaded_child_object_format() {
// double check format did not change
if !self.inner.protocol_config.loaded_child_object_format_type() && child_ty != &ty
{
let msg = format!("Type changed for child {child} when setting the value back");
return Err(
PartialVMError::new(StatusCode::UNKNOWN_INVARIANT_VIOLATION_ERROR)
.with_message(msg),
);
}
value
} else {
GlobalValue::none()
}
value
} else {
GlobalValue::none()
};
Expand Down
Loading