Index: src/global-handles.cc |
diff --git a/src/global-handles.cc b/src/global-handles.cc |
index e51c4aadf13d68bd581064f33628caf8bbf588d6..f4b69fcdd3038b6c1ef322eac24612a1964cb7d3 100644 |
--- a/src/global-handles.cc |
+++ b/src/global-handles.cc |
@@ -264,6 +264,16 @@ void GlobalHandles::IterateWeakRoots(ObjectVisitor* v) { |
} |
+void GlobalHandles::IterateWeakRoots(WeakReferenceGuest f, |
+ WeakReferenceCallback callback) { |
+ for (Node* current = head_; current != NULL; current = current->next()) { |
+ if (current->IsWeak() && current->callback() == callback) { |
+ f(current->object_, current->parameter()); |
+ } |
+ } |
+} |
+ |
+ |
void GlobalHandles::IdentifyWeakHandles(WeakSlotCallback f) { |
for (Node* current = head_; current != NULL; current = current->next()) { |
if (current->state_ == Node::WEAK) { |