| Index: runtime/vm/thread.cc
|
| diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
|
| index 2357ce6d0c7e0e4646c0ded5ece5ada5a2aca8fb..c220913101ce0ce6c7ca9523598c376ba17a73a2 100644
|
| --- a/runtime/vm/thread.cc
|
| +++ b/runtime/vm/thread.cc
|
| @@ -295,6 +295,16 @@ bool Thread::IsMutatorThread() const {
|
| }
|
|
|
|
|
| +bool Thread::CanCollectGarbage() const {
|
| + // We have non mutator threads grow the heap instead of triggering
|
| + // a garbage collection when they are at a safepoint (e.g: background
|
| + // compiler thread finalizing and installing code at a safepoint).
|
| + // Note: This code will change once the new Safepoint logic is in place.
|
| + return (IsMutatorThread() ||
|
| + (isolate_ != NULL && !isolate_->thread_registry()->AtSafepoint()));
|
| +}
|
| +
|
| +
|
| bool Thread::IsExecutingDartCode() const {
|
| return (top_exit_frame_info() == 0) &&
|
| (vm_tag() == VMTag::kDartTagId);
|
|
|