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

Unified Diff: third_party/WebKit/Source/platform/heap/Visitor.cpp

Issue 2570483002: Revert of Simple BlinkGC heap compaction. (Closed)
Patch Set: 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
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Visitor.h ('k') | third_party/WebKit/Source/wtf/Deque.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 51ff2063c272d8f490fad3a4fa84d4c45212007e..6ace492ae49f8dce67f3ce8f2c7919d615326464 100644
--- a/third_party/WebKit/Source/platform/heap/Visitor.cpp
+++ b/third_party/WebKit/Source/platform/heap/Visitor.cpp
@@ -18,9 +18,6 @@
case BlinkGC::GCWithSweep:
case BlinkGC::GCWithoutSweep:
return WTF::makeUnique<MarkingVisitor<Visitor::GlobalMarking>>(state);
- case BlinkGC::GCWithSweepCompaction:
- return WTF::makeUnique<
- MarkingVisitor<Visitor::GlobalMarkingWithCompaction>>(state);
case BlinkGC::TakeSnapshot:
return WTF::makeUnique<MarkingVisitor<Visitor::SnapshotMarking>>(state);
case BlinkGC::ThreadTerminationGC:
@@ -38,12 +35,13 @@
: VisitorHelper(state), m_markingMode(markingMode) {
// See ThreadState::runScheduledGC() why we need to already be in a
// GCForbiddenScope before any safe point is entered.
- DCHECK(state->isGCForbidden());
-#if ENABLE(ASSERT)
- DCHECK(state->checkThread());
-#endif
+ state->enterGCForbiddenScope();
+
+ ASSERT(state->checkThread());
}
-Visitor::~Visitor() {}
+Visitor::~Visitor() {
+ state()->leaveGCForbiddenScope();
+}
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/heap/Visitor.h ('k') | third_party/WebKit/Source/wtf/Deque.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698