Index: src/heap/heap.cc |
diff --git a/src/heap/heap.cc b/src/heap/heap.cc |
index fa327641250cd51d24d01f822ff04e641a758ab4..8c489bd940b1bd0eb5eec4ebd967974ac25ac2d8 100644 |
--- a/src/heap/heap.cc |
+++ b/src/heap/heap.cc |
@@ -120,6 +120,7 @@ Heap::Heap() |
min_in_mutator_(kMaxInt), |
marking_time_(0.0), |
sweeping_time_(0.0), |
+ last_idle_notification_time_(0.0), |
mark_compact_collector_(this), |
store_buffer_(this), |
marking_(this), |
@@ -4530,6 +4531,7 @@ bool Heap::IdleNotification(double deadline_in_seconds) { |
} |
double current_time = MonotonicallyIncreasingTimeInMs(); |
+ last_idle_notification_time_ = current_time; |
double deadline_difference = deadline_in_ms - current_time; |
if (deadline_difference >= 0) { |
@@ -4564,6 +4566,13 @@ bool Heap::IdleNotification(double deadline_in_seconds) { |
} |
+bool Heap::RecentIdleNotifcationHappened() { |
+ return (last_idle_notification_time_ + |
+ GCIdleTimeHandler::kMaxFrameRenderingIdleTime) > |
+ MonotonicallyIncreasingTimeInMs(); |
+} |
+ |
+ |
#ifdef DEBUG |
void Heap::Print() { |