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 4b07285edcc5fec4f7301044bcb89b3f1f6ac21b..bd3e06b5769328b33dae9f7dbcc81049d08de7de 100644 |
--- a/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
+++ b/third_party/WebKit/Source/platform/heap/ThreadState.cpp |
@@ -44,6 +44,7 @@ |
#include "public/platform/WebScheduler.h" |
#include "public/platform/WebThread.h" |
#include "public/platform/WebTraceLocation.h" |
+#include "wtf/CurrentTime.h" |
#include "wtf/DataLog.h" |
#include "wtf/Partitions.h" |
#include "wtf/ThreadingPrimitives.h" |
@@ -752,7 +753,7 @@ void ThreadState::performIdleGC(double deadlineSeconds) |
if (gcState() != IdleGCScheduled) |
return; |
- double idleDeltaInSeconds = deadlineSeconds - Platform::current()->monotonicallyIncreasingTimeSeconds(); |
+ double idleDeltaInSeconds = deadlineSeconds - monotonicallyIncreasingTime(); |
TRACE_EVENT2("blink_gc", "ThreadState::performIdleGC", "idleDeltaInSeconds", idleDeltaInSeconds, "estimatedMarkingTime", Heap::estimatedMarkingTime()); |
if (idleDeltaInSeconds <= Heap::estimatedMarkingTime() && !Platform::current()->currentThread()->scheduler()->canExceedIdleDeadlineIfRequired()) { |
// If marking is estimated to take longer than the deadline and we can't |
@@ -779,7 +780,7 @@ void ThreadState::performIdleLazySweep(double deadlineSeconds) |
if (sweepForbidden()) |
return; |
- TRACE_EVENT1("blink_gc", "ThreadState::performIdleLazySweep", "idleDeltaInSeconds", deadlineSeconds - Platform::current()->monotonicallyIncreasingTimeSeconds()); |
+ TRACE_EVENT1("blink_gc", "ThreadState::performIdleLazySweep", "idleDeltaInSeconds", deadlineSeconds - monotonicallyIncreasingTime()); |
bool sweepCompleted = true; |
SweepForbiddenScope scope(this); |
@@ -791,7 +792,7 @@ void ThreadState::performIdleLazySweep(double deadlineSeconds) |
// lazySweepWithDeadline() won't check the deadline until it sweeps |
// 10 pages. So we give a small slack for safety. |
double slack = 0.001; |
- double remainingBudget = deadlineSeconds - slack - Platform::current()->monotonicallyIncreasingTimeSeconds(); |
+ double remainingBudget = deadlineSeconds - slack - monotonicallyIncreasingTime(); |
if (remainingBudget <= 0 || !m_heaps[i]->lazySweepWithDeadline(deadlineSeconds)) { |
// We couldn't finish the sweeping within the deadline. |
// We request another idle task for the remaining sweeping. |