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

Unified Diff: third_party/WebKit/Source/platform/heap/BlinkGC.h

Issue 2531973002: Simple BlinkGC heap compaction. (Closed)
Patch Set: tidy up comment Created 4 years, 1 month 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
Index: third_party/WebKit/Source/platform/heap/BlinkGC.h
diff --git a/third_party/WebKit/Source/platform/heap/BlinkGC.h b/third_party/WebKit/Source/platform/heap/BlinkGC.h
index a0c271d948ea3a4dd4349e1162666ebe84e608e2..14200a44c1d49d3cd20da0fa30f9983fb1bac92c 100644
--- a/third_party/WebKit/Source/platform/heap/BlinkGC.h
+++ b/third_party/WebKit/Source/platform/heap/BlinkGC.h
@@ -25,6 +25,22 @@ using WeakCallback = VisitorCallback;
using EphemeronCallback = VisitorCallback;
using PreFinalizerCallback = bool (*)(void*);
+// Simple alias to avoid heap compaction type signatures turning into
+// a sea of generic |void*|s.
+using MovableReference = void*;
+
+// Heap compaction supports registering callbacks that are to be invoked
+// when an object is moved during compaction. This is to support internal
+// location fixups that need to happen as a result.
+//
+// i.e., when the object residing at |from| is moved to |to| by the compaction
+// pass, invoke the callback to adjust any internal references that now need
+// to be |to|-relative.
+using MovingObjectCallback = void (*)(void* callbackData,
+ MovableReference from,
+ MovableReference to,
+ size_t);
+
// List of typed arenas. The list is used to generate the implementation
// of typed arena related methods.
//

Powered by Google App Engine
This is Rietveld 408576698