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

chore: provide GC tools (WeakRef/FinalizationRegistry) to makeLiveSlots #1924

Merged
merged 3 commits into from
Oct 27, 2020

Commits on Oct 26, 2020

  1. fix: add stubs for GC tools (no-op on Node v12)

    The upcoming GC functionality will require `WeakRef` and
    `FinalizationRegistry`. Node.js v14 provides these as globals, but v12 does
    not (there might be a command-line flag to enable it, but I think it's marked
    as experimental). Rather than require all users upgrade to v14, we elect to
    disable GC when running on v12.
    
    This adds a local `weakref.js` module which attempts to pull `WeakRef` and
    `FinalizationRegistry` from the global, and exports either the real
    constructors or no-op stubs.
    
    refs #1872
    refs #1925
    warner committed Oct 26, 2020
    Configuration menu
    Copy the full SHA
    7ecc184 View commit details
    Browse the repository at this point in the history
  2. chore: provide GC tools (WeakRef/FinalizationRegistry) to makeLiveSlots

    These two authorities are not part of SES, so they must be pulled from the
    globals of the Start Compartment and ferried through the kernel to the vat
    manager factory that calls makeLiveSlots.
    
    This gives the outer layer of the vat (liveslots) access to nondeterminism.
    We rely upon liveslots to not share this power with the user-level ocap-style
    "vat code". Liveslots must never allow user-level code to observe behavior
    that depends upon GC activity, because that activity is not part of the
    specified input to the vat.
    
    refs #1872
    warner committed Oct 26, 2020
    Configuration menu
    Copy the full SHA
    3569dd8 View commit details
    Browse the repository at this point in the history

Commits on Oct 27, 2020

  1. fix: WeakRef taming follows taming pattern (#1931)

    * fix: WeakRef taming follows taming pattern
    
    * fix: error message
    
    * fix: minor
    erights authored Oct 27, 2020
    Configuration menu
    Copy the full SHA
    3949dfb View commit details
    Browse the repository at this point in the history