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

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

Issue 2689473002: Remove ThreadState::collectGarbageForTerminatingThread (Closed)
Patch Set: temp Created 3 years, 10 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
Index: third_party/WebKit/Source/platform/heap/ThreadState.cpp
diff --git a/third_party/WebKit/Source/platform/heap/ThreadState.cpp b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
index 85d1bf511358dbc944ba83bdeb67999eda042f6e..ee34cd00dc2ca634354983667355051f04fac5a1 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -1696,46 +1696,6 @@ void ThreadState::collectGarbage(BlinkGC::StackState stackState,
heap().decommitCallbackStacks();
}
-void ThreadState::collectGarbageForTerminatingThread() {
- // A thread-specific termination GC must not allow other global GCs to go
- // ahead while it is running, hence the termination GC does not enter a
- // safepoint. VisitorScope will not enter also a safepoint scope for
- // ThreadTerminationGC.
- GCForbiddenScope gcForbiddenScope(this);
-
- {
- std::unique_ptr<Visitor> visitor =
- Visitor::create(this, VisitorMarkingMode::ThreadLocalMarking);
-
- NoAllocationScope noAllocationScope(this);
-
- heap().commitCallbackStacks();
- preGC();
-
- // 1. Trace the thread local persistent roots. For thread local GCs we
- // don't trace the stack (ie. no conservative scanning) since this is
- // only called during thread shutdown where there should be no objects
- // on the stack.
- // We also assume that orphaned pages have no objects reachable from
- // persistent handles on other threads or CrossThreadPersistents. The
- // only cases where this could happen is if a subsequent conservative
- // global GC finds a "pointer" on the stack or due to a programming
- // error where an object has a dangling cross-thread pointer to an
- // object on this heap.
- visitPersistents(visitor.get());
-
- // 2. Trace objects reachable from the thread's persistent roots
- // including ephemerons.
- heap().processMarkingStack(visitor.get());
-
- heap().postMarkingProcessing(visitor.get());
- heap().globalWeakProcessing(visitor.get());
- }
-
- postGC(BlinkGC::GCWithSweep);
- heap().decommitCallbackStacks();
-}
-
void ThreadState::collectAllGarbage() {
// We need to run multiple GCs to collect a chain of persistent handles.
size_t previousLiveObjects = 0;
« no previous file with comments | « third_party/WebKit/Source/platform/heap/ThreadState.h ('k') | third_party/WebKit/Source/platform/heap/Visitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698