| Index: src/heap.cc
|
| diff --git a/src/heap.cc b/src/heap.cc
|
| index 24e4039422cc8ae010b17c9f700f32061d2cd204..f4cc421b0799b3092bc6014f2984a4fda5d08739 100644
|
| --- a/src/heap.cc
|
| +++ b/src/heap.cc
|
| @@ -711,6 +711,7 @@ int Heap::NotifyContextDisposed() {
|
| isolate()->optimizing_compiler_thread()->Flush();
|
| }
|
| flush_monomorphic_ics_ = true;
|
| + AgeInlineCaches();
|
| return ++contexts_disposed_;
|
| }
|
|
|
| @@ -1097,8 +1098,6 @@ void Heap::MarkCompact(GCTracer* tracer) {
|
|
|
| isolate_->counters()->objs_since_last_full()->Set(0);
|
|
|
| - contexts_disposed_ = 0;
|
| -
|
| flush_monomorphic_ics_ = false;
|
| }
|
|
|
| @@ -6000,12 +5999,7 @@ bool Heap::IdleNotification(int hint) {
|
| size_factor * IncrementalMarking::kAllocatedThreshold;
|
|
|
| if (contexts_disposed_ > 0) {
|
| - if (hint >= kMaxHint) {
|
| - // The embedder is requesting a lot of GC work after context disposal,
|
| - // we age inline caches so that they don't keep objects from
|
| - // the old context alive.
|
| - AgeInlineCaches();
|
| - }
|
| + contexts_disposed_ = 0;
|
| int mark_sweep_time = Min(TimeMarkSweepWouldTakeInMs(), 1000);
|
| if (hint >= mark_sweep_time && !FLAG_expose_gc &&
|
| incremental_marking()->IsStopped()) {
|
| @@ -6014,8 +6008,8 @@ bool Heap::IdleNotification(int hint) {
|
| "idle notification: contexts disposed");
|
| } else {
|
| AdvanceIdleIncrementalMarking(step_size);
|
| - contexts_disposed_ = 0;
|
| }
|
| +
|
| // After context disposal there is likely a lot of garbage remaining, reset
|
| // the idle notification counters in order to trigger more incremental GCs
|
| // on subsequent idle notifications.
|
|
|