| Index: runtime/vm/thread.cc
|
| diff --git a/runtime/vm/thread.cc b/runtime/vm/thread.cc
|
| index 967bac0d0e517b5f6e749636cbed04a71010f2dd..42df5357d8254b55e7cc496071f723072af84082 100644
|
| --- a/runtime/vm/thread.cc
|
| +++ b/runtime/vm/thread.cc
|
| @@ -553,10 +553,13 @@ 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).
|
| - return (IsMutatorThread() || IsAtSafepoint());
|
| + // We grow the heap instead of triggering a garbage collection when a
|
| + // thread is at a safepoint in the following situations :
|
| + // - background compiler thread finalizing and installing code
|
| + // - disassembly of the generated code is done after compilation
|
| + // So essentially we state that garbage collection is possible only
|
| + // when we are not at a safepoint.
|
| + return !IsAtSafepoint();
|
| }
|
|
|
|
|
|
|