diff options
Diffstat (limited to 'deps/v8/src/global-handles.h')
-rw-r--r-- | deps/v8/src/global-handles.h | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/deps/v8/src/global-handles.h b/deps/v8/src/global-handles.h index 2c2fbbd3f9..a379a74d44 100644 --- a/deps/v8/src/global-handles.h +++ b/deps/v8/src/global-handles.h @@ -137,11 +137,12 @@ class GlobalHandles { // Iterates over weak roots on the heap. void IterateWeakRootsForFinalizers(RootVisitor* v); - void IterateWeakRootsForPhantomHandles(WeakSlotCallback should_reset_handle); + void IterateWeakRootsForPhantomHandles( + WeakSlotCallbackWithHeap should_reset_handle); // Marks all handles that should be finalized based on the predicate // |should_reset_handle| as pending. - void IdentifyWeakHandles(WeakSlotCallback should_reset_handle); + void IdentifyWeakHandles(WeakSlotCallbackWithHeap should_reset_handle); // NOTE: Five ...NewSpace... functions below are used during // scavenge collections and iterate over sets of handles that are @@ -180,6 +181,8 @@ class GlobalHandles { void Print(); #endif // DEBUG + void InvokeSecondPassPhantomCallbacks(); + private: // Internal node structures. class Node; @@ -190,9 +193,7 @@ class GlobalHandles { explicit GlobalHandles(Isolate* isolate); - // Helpers for PostGarbageCollectionProcessing. - static void InvokeSecondPassPhantomCallbacks( - std::vector<PendingPhantomCallback>* callbacks, Isolate* isolate); + void InvokeSecondPassPhantomCallbacksFromTask(); int PostScavengeProcessing(int initial_post_gc_processing_count); int PostMarkSweepProcessing(int initial_post_gc_processing_count); int DispatchPendingPhantomCallbacks(bool synchronous_second_pass); @@ -223,6 +224,8 @@ class GlobalHandles { size_t number_of_phantom_handle_resets_; std::vector<PendingPhantomCallback> pending_phantom_callbacks_; + std::vector<PendingPhantomCallback> second_pass_callbacks_; + bool second_pass_callbacks_task_posted_ = false; friend class Isolate; @@ -300,7 +303,7 @@ class EternalHandles { // Iterates over all handles which might be in new space. void IterateNewSpaceRoots(RootVisitor* visitor); // Rebuilds new space list. - void PostGarbageCollectionProcessing(Heap* heap); + void PostGarbageCollectionProcessing(); private: static const int kInvalidIndex = -1; |