Chromium Code Reviews| Index: runtime/vm/thread.cc |
| diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc |
| index aa4f67ea92a647b00488f466a0e6f9ed26af02e4..a14d5b81848ba36c95fd24f64b129323b555abbe 100644 |
| --- a/runtime/vm/thread.cc |
| +++ b/runtime/vm/thread.cc |
| @@ -108,6 +108,15 @@ void Thread::Schedule(Isolate* isolate) { |
| ASSERT(isolate->thread_registry()->Contains(this)); |
| state_ = st; |
| } |
| + PostSchedule(); |
| +} |
| + |
| + |
| +void Thread::PostSchedule() { |
| + if ((current_block() == NULL) || current_block()->IsFull()) { |
| + // Thread doesn't have a timeline block or it is full, request a new one. |
|
koda
2015/08/07 01:09:54
Why not let these cases be handled naturally when
Cutch
2015/08/07 16:47:42
Done.
|
| + set_current_block(isolate_->GetNewTimelineBlock()); |
| + } |
| } |