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 handle leaks #7711

Merged
merged 4 commits into from
Jul 18, 2016
Merged

src: fix handle leaks #7711

merged 4 commits into from
Jul 18, 2016

Commits on Jul 18, 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 committed Jul 18, 2016
    Configuration menu
    Copy the full SHA
    6754bae 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 committed Jul 18, 2016
    Configuration menu
    Copy the full SHA
    c354b24 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 committed Jul 18, 2016
    Configuration menu
    Copy the full SHA
    4e989b0 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 committed Jul 18, 2016
    Configuration menu
    Copy the full SHA
    48c52d7 View commit details
    Browse the repository at this point in the history