Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index bc24b71a678b0c6b3d24ba57ed35c6c9b46c4ec4..6267a8896d123d0d861a57f83ab755bce933047f 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1671,6 +1671,10 @@ void Isolate::Deinit() { |
delete[] sweeper_thread_; |
sweeper_thread_ = NULL; |
+ if (FLAG_job_based_sweeping && |
+ heap_.mark_compact_collector()->IsConcurrentSweepingInProgress()) { |
+ heap_.mark_compact_collector()->WaitUntilSweepingCompleted(); |
+ } |
if (FLAG_hydrogen_stats) GetHStatistics()->Print(); |
@@ -2010,7 +2014,10 @@ bool Isolate::Init(Deserializer* des) { |
max_available_threads_ = Max(Min(CPU::NumberOfProcessorsOnline(), 4), 1); |
} |
- num_sweeper_threads_ = SweeperThread::NumberOfThreads(max_available_threads_); |
+ if (!FLAG_job_based_sweeping) { |
+ num_sweeper_threads_ = |
+ SweeperThread::NumberOfThreads(max_available_threads_); |
+ } |
if (FLAG_trace_hydrogen || FLAG_trace_hydrogen_stubs) { |
PrintF("Concurrent recompilation has been disabled for tracing.\n"); |