Skip to content

Commit

Permalink
Reword assert message
Browse files Browse the repository at this point in the history
  • Loading branch information
jedel1043 committed Apr 12, 2023
1 parent 5be4024 commit ab8b674
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion boa_engine/src/builtins/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,10 @@ impl BuiltInObjectInitializer {
fn set_data(&mut self, new_data: ObjectData) {
match self {
BuiltInObjectInitializer::Shared(obj) => {
assert!(std::ptr::eq(obj.vtable(), new_data.internal_methods));
assert!(
std::ptr::eq(obj.vtable(), new_data.internal_methods),
"intrinsic object's vtable didn't match with new data"
);
*obj.borrow_mut().kind_mut() = new_data.kind;
}
BuiltInObjectInitializer::Unique { ref mut data, .. } => *data = new_data,
Expand Down

0 comments on commit ab8b674

Please sign in to comment.