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

src: do not track BaseObjects via cleanup hooks #33809

Closed
wants to merge 1 commit into from

Commits on Jun 9, 2020

  1. src: do not track BaseObjects via cleanup hooks

    Since f59ec2a, `BaseObject` instances were tracked in heap snapshots
    through their associated `CleanupHookCallback`s which were stored on
    the `Environment`; however, this is inaccurate, because:
    
    - Edges in heap dumps imply a keeps-alive relationship, but cleanup
      hooks do not keep the `BaseObject`s that they point to alive.
    - It loses information about whether `BaseObject` instances are
      GC roots: Even weak `BaseObject`s are now, practically speaking,
      showing up as hanging off a GC root when that isn’t actually the case
      (e.g. in the description of nodejs#33468).
    
    Thus, this is a partial revert of f59ec2a.
    
    Refs: nodejs#33468
    Refs: nodejs#27018
    addaleax committed Jun 9, 2020
    Configuration menu
    Copy the full SHA
    88d1dfb View commit details
    Browse the repository at this point in the history