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: fix inspecting MessagePort from init async hook #31600

Closed
wants to merge 2 commits into from

Commits on Feb 1, 2020

  1. src: fix inspecting MessagePort from init async hook

    During the `init()` async hook, the C++ object is not finished
    creating yet (i.e. it is an `AsyncWrap`, but not yet a `HandleWrap`
    or `MessagePort`). Accessing the `handle_` field is not valid
    in that case.
    
    However, the custom inspect function for `MessagePort`s calls
    `HasRef()` on the object, which would crash when the object
    is not fully constructed. Fix that by guarding the access of
    the libuv handle on that condition.
    addaleax committed Feb 1, 2020
    Configuration menu
    Copy the full SHA
    95138dc View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    2022e0d View commit details
    Browse the repository at this point in the history