Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(184)

Unified Diff: src/global-handles.h

Issue 1209403005: Let the second pass phantom callbacks run in a separate task on the foreground thread. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Run second pass callbacks synchronously when GC is forced. Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/d8.cc ('k') | src/global-handles.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/global-handles.h
diff --git a/src/global-handles.h b/src/global-handles.h
index 6724847303d4188ffdab4fb31c859a9b85d2a410..0ee8c20a375adaea6803c11034686b08d806f9d8 100644
--- a/src/global-handles.h
+++ b/src/global-handles.h
@@ -181,7 +181,8 @@ class GlobalHandles {
// Process pending weak handles.
// Returns the number of freed nodes.
- int PostGarbageCollectionProcessing(GarbageCollector collector);
+ int PostGarbageCollectionProcessing(
+ GarbageCollector collector, const v8::GCCallbackFlags gc_callback_flags);
// Iterates over all strong handles.
void IterateStrongRoots(ObjectVisitor* v);
@@ -287,17 +288,21 @@ class GlobalHandles {
// don't assign any initial capacity.
static const int kObjectGroupConnectionsCapacity = 20;
+ class PendingPhantomCallback;
+
// Helpers for PostGarbageCollectionProcessing.
+ static void InvokeSecondPassPhantomCallbacks(
+ List<PendingPhantomCallback>* callbacks, Isolate* isolate);
int PostScavengeProcessing(int initial_post_gc_processing_count);
int PostMarkSweepProcessing(int initial_post_gc_processing_count);
- int DispatchPendingPhantomCallbacks();
+ int DispatchPendingPhantomCallbacks(bool synchronous_second_pass);
void UpdateListOfNewSpaceNodes();
// Internal node structures.
class Node;
class NodeBlock;
class NodeIterator;
- class PendingPhantomCallback;
+ class PendingPhantomCallbacksSecondPassTask;
Isolate* isolate_;
« no previous file with comments | « src/d8.cc ('k') | src/global-handles.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698