diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2010-11-19 10:49:09 -0800 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2010-11-19 10:49:09 -0800 |
commit | cbdcc1d5f321cfff3d4d3f416e48733089de7e00 (patch) | |
tree | 5d44f3a1fdb3d48326566126eca8e31729f6db90 /deps/v8/src/global-handles.cc | |
parent | f11291a220136164294e3cac5f09efd6c2b21be6 (diff) | |
download | node-cbdcc1d5f321cfff3d4d3f416e48733089de7e00.tar.gz |
Upgrade V8 to 2.5.7
Diffstat (limited to 'deps/v8/src/global-handles.cc')
-rw-r--r-- | deps/v8/src/global-handles.cc | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deps/v8/src/global-handles.cc b/deps/v8/src/global-handles.cc index 9ede90852..533984098 100644 --- a/deps/v8/src/global-handles.cc +++ b/deps/v8/src/global-handles.cc @@ -372,13 +372,14 @@ void GlobalHandles::IdentifyWeakHandles(WeakSlotCallback f) { int post_gc_processing_count = 0; -void GlobalHandles::PostGarbageCollectionProcessing() { +bool GlobalHandles::PostGarbageCollectionProcessing() { // Process weak global handle callbacks. This must be done after the // GC is completely done, because the callbacks may invoke arbitrary // API functions. // At the same time deallocate all DESTROYED nodes. ASSERT(Heap::gc_state() == Heap::NOT_IN_GC); const int initial_post_gc_processing_count = ++post_gc_processing_count; + bool next_gc_likely_to_collect_more = false; Node** p = &head_; while (*p != NULL) { if ((*p)->PostGarbageCollectionProcessing()) { @@ -399,6 +400,7 @@ void GlobalHandles::PostGarbageCollectionProcessing() { } node->set_next_free(first_deallocated()); set_first_deallocated(node); + next_gc_likely_to_collect_more = true; } else { p = (*p)->next_addr(); } @@ -407,6 +409,8 @@ void GlobalHandles::PostGarbageCollectionProcessing() { if (first_deallocated()) { first_deallocated()->set_next(head()); } + + return next_gc_likely_to_collect_more; } |