Skip to content

Commit

Permalink
fix: the ic prototype of shape should release by gc
Browse files Browse the repository at this point in the history
  • Loading branch information
ErosZy committed May 9, 2023
1 parent b80b0e2 commit 2006aff
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -645,9 +645,12 @@ void mark_children(JSRuntime* rt, JSGCObjectHeader* gp, JS_MarkFunc* mark_func)
if (b->ic) {
for (i = 0; i < b->ic->count; i++) {
buffer = b->ic->cache[i].buffer;
for (j = 0; j < IC_CACHE_ITEM_CAPACITY; j++)
for (j = 0; j < IC_CACHE_ITEM_CAPACITY; j++) {
if (buffer[j].shape)
mark_func(rt, &buffer[j].shape->header);
if (buffer[j].proto)
mark_func(rt, &buffer[j].proto->header);
}
}
}
}
Expand Down

0 comments on commit 2006aff

Please sign in to comment.