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

buffer: do proper error propagation in addon methods #23939

Closed
wants to merge 1 commit into from

Commits on Oct 28, 2018

  1. buffer: do proper error propagation in addon methods

    - Always fulfill the `MaybeLocal<>` contract by scheduling an
      exception when returning an empty value. This was previously
      inconsistent, with no way to know whether an exception was
      be scheduled or not in case of failure.
    - Make sure that memory is released exactly once in case of
      failure. Previously, some exit conditions would have leaked
      memory or attempted to free it multiple times.
    
    This should not really affect how `Buffer`s are created by
    addons in practice, due to the low frequency with which
    these errors would typically occur.
    addaleax committed Oct 28, 2018
    Configuration menu
    Copy the full SHA
    5b67c33 View commit details
    Browse the repository at this point in the history