File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -546,7 +546,7 @@ void Heap::CollectOldSpaceGarbage(Thread* thread,
546546
547547 // Some Code objects may have been collected so invalidate handler cache.
548548 thread->isolate_group ()->handler_info_cache ()->Clear ();
549- thread->isolate_group ()->ClearCatchEntryMovesCache ();
549+ thread->isolate_group ()->ClearCatchEntryMovesCacheLocked ();
550550 assume_scavenge_will_fail_ = false ;
551551 }
552552}
Original file line number Diff line number Diff line change @@ -947,8 +947,14 @@ void IsolateGroup::RunWithCachedCatchEntryMoves(
947947 }
948948}
949949
950- void IsolateGroup::ClearCatchEntryMovesCache () {
951- SafepointMutexLocker ml (&cache_mutex_);
950+ void IsolateGroup::ClearCatchEntryMovesCacheLocked () {
951+ auto thread = Thread::Current ();
952+ ASSERT (thread->OwnsSafepoint () ||
953+ (thread->task_kind () == Thread::kMutatorTask ) ||
954+ (thread->task_kind () == Thread::kMarkerTask ) ||
955+ (thread->task_kind () == Thread::kCompactorTask ) ||
956+ (thread->task_kind () == Thread::kScavengerTask ) ||
957+ (thread->task_kind () == Thread::kIncrementalCompactorTask ));
952958 catch_entry_moves_cache_.Clear ();
953959}
954960
Original file line number Diff line number Diff line change @@ -780,7 +780,7 @@ class IsolateGroup : public IntrusiveDListEntry<IsolateGroup> {
780780 const Code& code,
781781 intptr_t pc,
782782 std::function<void (const CatchEntryMoves&)> action);
783- void ClearCatchEntryMovesCache ();
783+ void ClearCatchEntryMovesCacheLocked ();
784784
785785 void SetNativeAssetsCallbacks (NativeAssetsApi* native_assets_api) {
786786 native_assets_api_ = *native_assets_api;
You can’t perform that action at this time.
0 commit comments