Don't check for thread in gc_sweep_page

We should always have a thread when we sweep so we don't need to check
that it exists.
This commit is contained in:
Peter Zhu 2024-04-16 11:16:19 -04:00
Родитель f06670c5a2
Коммит e5df8897fe
1 изменённых файлов: 1 добавлений и 4 удалений

5
gc.c
Просмотреть файл

@ -5462,10 +5462,7 @@ gc_sweep_page(rb_objspace_t *objspace, rb_heap_t *heap, struct gc_sweep_context
sweep_page->size_pool->total_freed_objects += ctx->freed_slots;
if (heap_pages_deferred_final && !finalizing) {
rb_thread_t *th = GET_THREAD();
if (th) {
gc_finalize_deferred_register(objspace);
}
gc_finalize_deferred_register(objspace);
}
#if RGENGC_CHECK_MODE