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

Backport src: fix handle leaks #7711 #9014

Merged
merged 4 commits into from
Oct 11, 2016

Commits on Oct 11, 2016

  1. src: fix handle leak in Buffer::New()

    Fix handle leaks in Buffer::New() and Buffer::Copy() by creating the
    handle scope before looking up the env with Environment::GetCurrent().
    
    Environment::GetCurrent() calls v8::Isolate::GetCurrentContext(), which
    creates a handle in the current scope, i.e., the scope created by the
    caller of Buffer::New() or Buffer::Copy().
    
    PR-URL: nodejs#7711
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    bnoordhuis authored and Myles Borins committed Oct 11, 2016
    Configuration menu
    Copy the full SHA
    961b354 View commit details
    Browse the repository at this point in the history
  2. src: fix handle leak in BuildStatsObject()

    Create a handle scope before performing a check that creates a handle,
    otherwise the handle is leaked into the handle scope of the caller.
    
    PR-URL: nodejs#7711
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    bnoordhuis authored and Myles Borins committed Oct 11, 2016
    Configuration menu
    Copy the full SHA
    11f1da8 View commit details
    Browse the repository at this point in the history
  3. src: fix handle leak in UDPWrap::Instantiate()

    Create a handle scope before performing a check that creates a handle,
    otherwise the handle is leaked into the handle scope of the caller.
    
    PR-URL: nodejs#7711
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    bnoordhuis authored and Myles Borins committed Oct 11, 2016
    Configuration menu
    Copy the full SHA
    d6cac6d View commit details
    Browse the repository at this point in the history
  4. src: remove unnecessary HandleScopes

    API function callbacks run inside an implicit HandleScope.  We don't
    need to explicitly create one and in fact introduce some unnecessary
    overhead when we do.
    
    PR-URL: nodejs#7711
    Reviewed-By: Anna Henningsen <anna@addaleax.net>
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Trevor Norris <trev.norris@gmail.com>
    bnoordhuis authored and Myles Borins committed Oct 11, 2016
    Configuration menu
    Copy the full SHA
    6f3ac5d View commit details
    Browse the repository at this point in the history