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 6, 2023
1 parent 5a2e439 commit 02dc27f
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 @@ -435,7 +435,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 02dc27f

Please sign in to comment.