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

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

Issue 2765843002: Enable idle GC for worker thread heaps. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 c0dbce7a49c0dfac511f2d0c042c2382e6d4fe8c..7821c47460851bc5fc5f97655589dd892f877750 100644
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp
@@ -570,7 +570,6 @@ ThreadState* ThreadState::fromObject(const void* object) {
void ThreadState::performIdleGC(double deadlineSeconds) {
ASSERT(checkThread());
- ASSERT(isMainThread());
ASSERT(Platform::current()->currentThread()->scheduler());
if (gcState() != IdleGCScheduled)
@@ -603,7 +602,6 @@ void ThreadState::performIdleGC(double deadlineSeconds) {
void ThreadState::performIdleLazySweep(double deadlineSeconds) {
ASSERT(checkThread());
- ASSERT(isMainThread());
// If we are not in a sweeping phase, there is nothing to do here.
if (!isSweepingInProgress())
@@ -646,10 +644,6 @@ void ThreadState::performIdleLazySweep(double deadlineSeconds) {
}
void ThreadState::scheduleIdleGC() {
- // TODO(haraken): Idle GC should be supported in worker threads as well.
- if (!isMainThread())
- return;
-
if (isSweepingInProgress()) {
setGCState(SweepingAndIdleGCScheduled);
return;
@@ -666,10 +660,6 @@ void ThreadState::scheduleIdleGC() {
}
void ThreadState::scheduleIdleLazySweep() {
- // TODO(haraken): Idle complete sweep should be supported in worker threads.
- if (!isMainThread())
- return;
-
// Some threads (e.g. PPAPI thread) don't have a scheduler.
if (!Platform::current()->currentThread()->scheduler())
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698