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: introduce custom smart pointers for BaseObjects #30374

Closed
wants to merge 5 commits into from

Commits on Nov 12, 2019

  1. src: introduce custom smart pointers for BaseObjects

    Referring to `BaseObject` instances using standard C++ smart pointers
    can interfere with BaseObject’s own cleanup mechanisms
    (explicit delete, delete-on-GC and delete-on-cleanup).
    
    Introducing custom smart pointers allows referring to `BaseObject`s
    safely while keeping those mechanisms intact.
    
    Refs: nodejs/quic#141
    Refs: nodejs/quic#149
    Reviewed-By: James M Snell <[email protected]>
    addaleax committed Nov 12, 2019
    Configuration menu
    Copy the full SHA
    3ff2122 View commit details
    Browse the repository at this point in the history
  2. http2: use custom BaseObject smart pointers

    Refs: nodejs/quic#141
    Reviewed-By: James M Snell <[email protected]>
    addaleax committed Nov 12, 2019
    Configuration menu
    Copy the full SHA
    c371a37 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    697e719 View commit details
    Browse the repository at this point in the history
  4. src: remove keep alive option from SetImmediate()

    This is no longer necessary now that the copyable `BaseObjectPtr`
    is available (as opposed to the only-movable `v8::Global`).
    addaleax committed Nov 12, 2019
    Configuration menu
    Copy the full SHA
    82f06be View commit details
    Browse the repository at this point in the history
  5. src: remove HandleWrap instances from list once closed

    This allows keeping `BaseObjectPtr`s to `HandleWrap` instances.
    Previously, the pointer kept the `HandleWrap` object alive, leaving
    the Environment cleanup code that waits for the handle list to drain
    in a busy loop, because only the `HandleWrap` destructor removed
    the item from the list.
    
    Refs: nodejs/quic#165
    Reviewed-By: James M Snell <[email protected]>
    Reviewed-By: Daniel Bevenius <[email protected]>
    addaleax committed Nov 12, 2019
    Configuration menu
    Copy the full SHA
    360b843 View commit details
    Browse the repository at this point in the history