Chromium Code Reviews| Index: src/isolate.cc |
| diff --git a/src/isolate.cc b/src/isolate.cc |
| index 60e3379e15a4d848aad2fed45fdadd58c14d7354..480c75c1eab6029d8d35c0791b303c2344e7d8dd 100644 |
| --- a/src/isolate.cc |
| +++ b/src/isolate.cc |
| @@ -1692,6 +1692,7 @@ Isolate::Isolate() |
| #undef ISOLATE_INIT_ARRAY_EXECUTE |
| } |
| + |
| void Isolate::TearDown() { |
| TRACE_ISOLATE(tear_down); |
| @@ -1729,6 +1730,17 @@ void Isolate::Deinit() { |
| if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Stop(); |
| + if (FLAG_concurrent_sweeping || FLAG_parallel_sweeping) { |
|
Michael Starzinger
2013/01/24 17:15:54
Move this above the stopping of the optimizing com
Hannes Payer (out of office)
2013/01/25 10:46:49
Done.
|
| + for (int i = 0; i < FLAG_sweeper_threads; i++) { |
| + sweeper_thread_[i]->Stop(); |
| + } |
| + |
| + for (int i = 0; i < FLAG_sweeper_threads; i++) { |
| + delete sweeper_thread_[i]; |
| + } |
| + delete[] sweeper_thread_; |
| + } |
| + |
| if (FLAG_hydrogen_stats) HStatistics::Instance()->Print(); |
| // We must stop the logger before we tear down other components. |
| @@ -2089,6 +2101,18 @@ bool Isolate::Init(Deserializer* des) { |
| } |
| if (FLAG_parallel_recompilation) optimizing_compiler_thread_.Start(); |
| + |
| + if (FLAG_parallel_sweeping || FLAG_concurrent_sweeping) { |
| + if (FLAG_sweeper_threads < 1) { |
|
Michael Starzinger
2013/01/24 17:15:54
Just set it to one if it's smaller than one.
Hannes Payer (out of office)
2013/01/25 10:46:49
Done.
|
| + V8::SetFatalError(); |
| + return false; |
| + } |
| + sweeper_thread_ = new SweeperThread*[FLAG_sweeper_threads]; |
| + for (int i = 0; i < FLAG_sweeper_threads; i++) { |
| + sweeper_thread_[i] = new SweeperThread(this); |
| + sweeper_thread_[i]->Start(); |
| + } |
| + } |
| return true; |
| } |