Skip to content

Commit

Permalink
Flatten
Browse files Browse the repository at this point in the history
  • Loading branch information
littledivy committed Jan 16, 2025
1 parent b5ed169 commit 0484aa1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/cppgc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ struct PrototypeChainStore([Option<ErasedPtr>; MAX_PROTO_CHAIN]);
impl v8::cppgc::GarbageCollected for PrototypeChainStore {
fn trace(&self, visitor: &v8::cppgc::Visitor) {
// Trace all the objects top-down the prototype chain.
for ptr in self.0.iter() {
if let Some(ptr) = ptr {
ptr.ptr.trace(visitor);
}
for ptr in self.0.iter().flatten() {
ptr.ptr.trace(visitor);
}
}
}
Expand Down

0 comments on commit 0484aa1

Please sign in to comment.