Index: src/isolate.cc |
diff --git a/src/isolate.cc b/src/isolate.cc |
index 4970ec760871b793f71b5d8d3bd4dcfa086bd9c1..5cc3396c5128d8de08bca9e9c7d5f9de72130620 100644 |
--- a/src/isolate.cc |
+++ b/src/isolate.cc |
@@ -1772,6 +1772,8 @@ void Isolate::Deinit() { |
if (state_ == INITIALIZED) { |
TRACE_ISOLATE(deinit); |
+ if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Stop(); |
+ |
if (FLAG_sweeper_threads > 0) { |
for (int i = 0; i < FLAG_sweeper_threads; i++) { |
sweeper_thread_[i]->Stop(); |
@@ -1788,8 +1790,6 @@ void Isolate::Deinit() { |
delete[] marking_thread_; |
} |
- if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Stop(); |
- |
if (FLAG_hydrogen_stats) HStatistics::Instance()->Print(); |
// We must stop the logger before we tear down other components. |
@@ -2198,6 +2198,11 @@ bool Isolate::Init(Deserializer* des) { |
FLAG_concurrent_sweeping = false; |
FLAG_parallel_sweeping = false; |
} |
+ if (FLAG_parallel_recompilation && |
+ SystemThreadManager::NumberOfParallelSystemThreads( |
+ SystemThreadManager::PARALLEL_RECOMPILATION) == 0) { |
+ FLAG_parallel_recompilation = false; |
+ } |
return true; |
} |