Index: third_party/WebKit/Source/platform/heap/Visitor.cpp |
diff --git a/third_party/WebKit/Source/platform/heap/Visitor.cpp b/third_party/WebKit/Source/platform/heap/Visitor.cpp |
index 9ec0785d96eb02bcb4f1b370335aa422a78a2d2d..f513d9567316386262e197912751b14e2aa413fc 100644 |
--- a/third_party/WebKit/Source/platform/heap/Visitor.cpp |
+++ b/third_party/WebKit/Source/platform/heap/Visitor.cpp |
@@ -18,6 +18,8 @@ std::unique_ptr<Visitor> Visitor::create(ThreadState* state, |
case BlinkGC::GCWithSweep: |
case BlinkGC::GCWithoutSweep: |
return makeUnique<MarkingVisitor<Visitor::GlobalMarking>>(state); |
+ case BlinkGC::GCWithSweepCompaction: |
+ return makeUnique<MarkingVisitor<Visitor::GlobalMarkCompacting>>(state); |
case BlinkGC::TakeSnapshot: |
return makeUnique<MarkingVisitor<Visitor::SnapshotMarking>>(state); |
case BlinkGC::ThreadTerminationGC: |
@@ -34,13 +36,12 @@ Visitor::Visitor(ThreadState* state, MarkingMode markingMode) |
: VisitorHelper(state), m_markingMode(markingMode) { |
// See ThreadState::runScheduledGC() why we need to already be in a |
// GCForbiddenScope before any safe point is entered. |
- state->enterGCForbiddenScope(); |
- |
- ASSERT(state->checkThread()); |
+ DCHECK(state->isGCForbidden()); |
+#if ENABLE(ASSERT) |
+ DCHECK(state->checkThread()); |
+#endif |
} |
-Visitor::~Visitor() { |
- state()->leaveGCForbiddenScope(); |
-} |
+Visitor::~Visitor() {} |
} // namespace blink |