Index: src/api.cc |
diff --git a/src/api.cc b/src/api.cc |
index ae42da4ae6dbd09d300b2b4dcedd53455efc3ac2..43be499b3d88ff78ce7c5d16791a7dcac0ee5c03 100644 |
--- a/src/api.cc |
+++ b/src/api.cc |
@@ -8796,30 +8796,10 @@ bool Isolate::IsInUse() { |
} |
-class VisitorAdapter : public i::ObjectVisitor { |
- public: |
- explicit VisitorAdapter(PersistentHandleVisitor* visitor) |
- : visitor_(visitor) {} |
- void VisitPointers(i::Object** start, i::Object** end) override { |
- UNREACHABLE(); |
- } |
- DISABLE_CFI_PERF |
- void VisitEmbedderReference(i::Object** p, uint16_t class_id) override { |
- Value* value = ToApi<Value>(i::Handle<i::Object>(p)); |
- visitor_->VisitPersistentHandle( |
- reinterpret_cast<Persistent<Value>*>(&value), class_id); |
- } |
- |
- private: |
- PersistentHandleVisitor* visitor_; |
-}; |
- |
- |
void Isolate::VisitHandlesWithClassIds(PersistentHandleVisitor* visitor) { |
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
i::DisallowHeapAllocation no_allocation; |
- VisitorAdapter visitor_adapter(visitor); |
- isolate->global_handles()->IterateAllRootsWithClassIds(&visitor_adapter); |
+ isolate->global_handles()->IterateAllRootsWithClassIds(visitor); |
} |
@@ -8827,18 +8807,14 @@ void Isolate::VisitHandlesForPartialDependence( |
PersistentHandleVisitor* visitor) { |
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
i::DisallowHeapAllocation no_allocation; |
- VisitorAdapter visitor_adapter(visitor); |
- isolate->global_handles()->IterateAllRootsInNewSpaceWithClassIds( |
- &visitor_adapter); |
+ isolate->global_handles()->IterateAllRootsInNewSpaceWithClassIds(visitor); |
} |
void Isolate::VisitWeakHandles(PersistentHandleVisitor* visitor) { |
i::Isolate* isolate = reinterpret_cast<i::Isolate*>(this); |
i::DisallowHeapAllocation no_allocation; |
- VisitorAdapter visitor_adapter(visitor); |
- isolate->global_handles()->IterateWeakRootsInNewSpaceWithClassIds( |
- &visitor_adapter); |
+ isolate->global_handles()->IterateWeakRootsInNewSpaceWithClassIds(visitor); |
} |