Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: fix member of ScriptWrappable not tracked by GC. #388

Merged
merged 2 commits into from
Jun 16, 2023

Conversation

andycall
Copy link
Member

The basic rule when using in ScriptWrappable is that it must be tracked by GCVisitor.

This patch fixes a bug in touch_list.cc caused by the Trace() function bypassing the aforementioned rules.

void TouchList::Trace(GCVisitor* visitor) const {
  for (auto& item : values_) {
    item->Trace(visitor); // This line of code bypass the tracing of GC.
  }
}

@yifei8 yifei8 added this pull request to the merge queue Jun 16, 2023
Merged via the queue into main with commit 3345b0a Jun 16, 2023
@yifei8 yifei8 deleted the fix/touch_list_trace_error branch June 16, 2023 02:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants