1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

also unpin final on weak maps

This commit is contained in:
Aaron Patterson 2019-08-09 16:27:43 -07:00
parent 76a928bac2
commit 6749682f82
No known key found for this signature in database
GPG key ID: 953170BCB4FFAFC6

3
gc.c
View file

@ -10135,6 +10135,7 @@ wmap_compact(void *ptr)
struct weakmap *w = ptr;
if (w->wmap2obj) rb_gc_update_tbl_refs(w->wmap2obj);
if (w->obj2wmap) rb_gc_update_tbl_refs(w->obj2wmap);
w->final = rb_gc_location(w->final);
}
static void
@ -10144,7 +10145,7 @@ wmap_mark(void *ptr)
#if WMAP_DELETE_DEAD_OBJECT_IN_MARK
if (w->obj2wmap) st_foreach(w->obj2wmap, wmap_mark_map, (st_data_t)&rb_objspace);
#endif
rb_gc_mark(w->final);
rb_gc_mark_no_pin(w->final);
}
static int