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

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

Issue 971283002: Add canExceedIdleDeadlineIfRequired function to Scheduler and use it in Oilpan (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix Typo Created 5 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 | Source/platform/scheduler/Scheduler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/heap/ThreadState.cpp
diff --git a/Source/platform/heap/ThreadState.cpp b/Source/platform/heap/ThreadState.cpp
index ee4371b6feb516b13100408854cb651b9fcffd96..5b256b690e4996540d2e76705f25d737d0b8948b 100644
--- a/Source/platform/heap/ThreadState.cpp
+++ b/Source/platform/heap/ThreadState.cpp
@@ -591,7 +591,9 @@ void ThreadState::performIdleGC(double deadlineSeconds)
return;
double idleDeltaInSeconds = deadlineSeconds - Platform::current()->monotonicallyIncreasingTime();
- if (idleDeltaInSeconds <= Heap::estimatedMarkingTime()) {
+ if (idleDeltaInSeconds <= Heap::estimatedMarkingTime() && !Scheduler::shared()->canExceedIdleDeadlineIfRequired()) {
+ // If marking is estimated to take longer than the deadline and we can't
+ // exceed the deadline, then reschedule for the next idle period.
scheduleIdleGC();
return;
}
« no previous file with comments | « no previous file | Source/platform/scheduler/Scheduler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698