Make sure we do not start incremental marking in idle notification when incremental...
authorhpayer <hpayer@chromium.org>
Thu, 11 Jun 2015 07:41:31 +0000 (00:41 -0700)
committerCommit bot <commit-bot@chromium.org>
Thu, 11 Jun 2015 07:41:39 +0000 (07:41 +0000)
BUG=chromium:498315
LOG=n

Review URL: https://codereview.chromium.org/1177953002

Cr-Commit-Position: refs/heads/master@{#28925}

src/heap/gc-idle-time-handler.cc

index 168cc81..ab84a73 100644 (file)
@@ -2,6 +2,7 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include "src/flags.h"
 #include "src/heap/gc-idle-time-handler.h"
 #include "src/heap/gc-tracer.h"
 #include "src/utils.h"
@@ -322,8 +323,9 @@ GCIdleTimeAction GCIdleTimeHandler::Action(double idle_time_in_ms,
     }
   }
 
-  if (heap_state.incremental_marking_stopped &&
-      !heap_state.can_start_incremental_marking && !reduce_memory) {
+  if (!FLAG_incremental_marking ||
+      (heap_state.incremental_marking_stopped &&
+       !heap_state.can_start_incremental_marking && !reduce_memory)) {
     return NothingOrDone();
   }