@@ -482,22 +482,19 @@ void Thread::ExitIsolate(bool isolate_shutdown) {
482482 }
483483}
484484
485- bool Thread::EnterIsolateGroupAsHelper (IsolateGroup* isolate_group,
485+ void Thread::EnterIsolateGroupAsHelper (IsolateGroup* isolate_group,
486486 TaskKind kind,
487487 bool bypass_safepoint) {
488488 Thread* thread = AddActiveThread (isolate_group, /* isolate=*/ nullptr ,
489489 /* is_dart_mutator=*/ false , bypass_safepoint);
490- if (thread != nullptr ) {
491- thread->SetupState (kind);
492- // Even if [bypass_safepoint] is true, a thread may need mutator state (e.g.
493- // parallel scavenger threads write to the [Thread]s storebuffer)
494- thread->SetupMutatorState (kind);
495- ResumeThreadInternal (thread);
490+ RELEASE_ASSERT (thread != nullptr );
491+ thread->SetupState (kind);
492+ // Even if [bypass_safepoint] is true, a thread may need mutator state (e.g.
493+ // parallel scavenger threads write to the [Thread]s storebuffer)
494+ thread->SetupMutatorState (kind);
495+ ResumeThreadInternal (thread);
496496
497- thread->AssertNonDartMutatorInvariants ();
498- return true ;
499- }
500- return false ;
497+ thread->AssertNonDartMutatorInvariants ();
501498}
502499
503500void Thread::ExitIsolateGroupAsHelper (bool bypass_safepoint) {
@@ -513,19 +510,16 @@ void Thread::ExitIsolateGroupAsHelper(bool bypass_safepoint) {
513510 bypass_safepoint);
514511}
515512
516- bool Thread::EnterIsolateGroupAsNonMutator (IsolateGroup* isolate_group,
513+ void Thread::EnterIsolateGroupAsNonMutator (IsolateGroup* isolate_group,
517514 TaskKind kind) {
518515 Thread* thread =
519516 AddActiveThread (isolate_group, /* isolate=*/ nullptr ,
520517 /* is_dart_mutator=*/ false , /* bypass_safepoint=*/ true );
521- if (thread != nullptr ) {
522- thread->SetupState (kind);
523- ResumeThreadInternal (thread);
518+ ASSERT (thread != nullptr );
519+ thread->SetupState (kind);
520+ ResumeThreadInternal (thread);
524521
525- thread->AssertNonMutatorInvariants ();
526- return true ;
527- }
528- return false ;
522+ thread->AssertNonMutatorInvariants ();
529523}
530524
531525void Thread::ExitIsolateGroupAsNonMutator () {
0 commit comments