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

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

Issue 2531973002: Simple BlinkGC heap compaction. (Closed)
Patch Set: synchronize on compaction finish Created 4 years 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/InlinedGlobalMarkingVisitor.h
diff --git a/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h b/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h
index cfe134730d90e5f26d6f899c7ed14f3a13edf67c..5f10556eb7376e8caeaca72f5d71c3ae2cc19fbb 100644
--- a/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h
+++ b/third_party/WebKit/Source/platform/heap/InlinedGlobalMarkingVisitor.h
@@ -18,8 +18,9 @@ class InlinedGlobalMarkingVisitor final
friend class MarkingVisitorImpl<InlinedGlobalMarkingVisitor>;
using Impl = MarkingVisitorImpl<InlinedGlobalMarkingVisitor>;
- explicit InlinedGlobalMarkingVisitor(ThreadState* state)
- : VisitorHelper(state) {}
+ InlinedGlobalMarkingVisitor(ThreadState* state,
+ Visitor::MarkingMode markingMode)
+ : VisitorHelper(state), m_markingMode(markingMode) {}
// Hack to unify interface to visitor->trace().
// Without this hack, we need to use visitor.trace() for
@@ -54,14 +55,14 @@ class InlinedGlobalMarkingVisitor final
return true;
}
- inline Visitor::MarkingMode getMarkingMode() const {
- return Visitor::GlobalMarking;
- }
+ inline Visitor::MarkingMode getMarkingMode() const { return m_markingMode; }
private:
static InlinedGlobalMarkingVisitor fromHelper(Helper* helper) {
return *static_cast<InlinedGlobalMarkingVisitor*>(helper);
}
+
+ const Visitor::MarkingMode m_markingMode;
haraken 2016/12/02 12:43:20 Would you help me understand why you need to add t
sof 2016/12/04 14:55:38 InlinedGlobalMarkingVisitor isn't a Visitor, and t
haraken 2016/12/09 07:25:54 Maybe can we move m_markingMode to VisitorHelper?
sof 2016/12/09 21:44:03 Possibly, but it's a more complex than that given
};
inline void GarbageCollectedMixin::trace(InlinedGlobalMarkingVisitor) {}

Powered by Google App Engine
This is Rietveld 408576698