BUG=
Review URL: https://codereview.chromium.org/
11969037
Patch from Kentaro Hara <haraken@chromium.org>.
git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@13445
ce2b1a6d-e550-0410-aec6-
3dcde31c8c00
}
-void GlobalHandles::IterateWeakRoots(WeakReferenceGuest f,
- WeakReferenceCallback callback) {
- for (NodeIterator it(this); !it.done(); it.Advance()) {
- if (it.node()->IsWeak() && it.node()->callback() == callback) {
- f(it.node()->object(), it.node()->parameter());
- }
- }
-}
-
-
void GlobalHandles::IdentifyWeakHandles(WeakSlotCallback f) {
for (NodeIterator it(this); !it.done(); it.Advance()) {
if (it.node()->IsWeak() && f(it.node()->location())) {
};
-typedef void (*WeakReferenceGuest)(Object* object, void* parameter);
-
class GlobalHandles {
public:
~GlobalHandles();
// Iterates over all weak roots in heap.
void IterateWeakRoots(ObjectVisitor* v);
- // Iterates over weak roots that are bound to a given callback.
- void IterateWeakRoots(WeakReferenceGuest f,
- WeakReferenceCallback callback);
-
// Find all weak handles satisfying the callback predicate, mark
// them as pending.
void IdentifyWeakHandles(WeakSlotCallback f);