Skip to content

Commit e252d45

Browse files
aamCommit Queue
authored andcommitted
[vm/shared] Fix check for presence of dart mutator stack.
For GC purposes dart mutator thread could be identified by task kind, or if gc task is occupying the thread, by presence of scheduled isolate or (in case of isolategroup-shared thread) by presence of top_exit_frame. Fixes dartbug.com/60705 TEST=ci Change-Id: I09d212caf06e92a36efe1e5d397e5bb89846ced2 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/427981 Reviewed-by: Slava Egorov <[email protected]> Commit-Queue: Alexander Aprelev <[email protected]>
1 parent 4cdb2df commit e252d45

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

runtime/vm/thread.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,11 @@ class Thread : public ThreadState {
593593
bool HasDartMutatorStack() const {
594594
// The thread with dart mutator task might be temporarily
595595
// occupied by a gc task.
596-
return IsDartMutatorThread() || scheduled_dart_mutator_isolate_ != nullptr;
596+
return IsDartMutatorThread()
597+
// mutator thread with isolate
598+
|| scheduled_dart_mutator_isolate_ != nullptr
599+
// mutator thread without isolate
600+
|| top_exit_frame_info_ != 0;
597601
}
598602

599603
// Returns the dart mutator [Isolate] this thread belongs to or nullptr.

0 commit comments

Comments
 (0)