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

deps: fix async await desugaring in V8 #12004

Merged
merged 1 commit into from
Mar 27, 2017

Commits on Mar 27, 2017

  1. deps: fix async await desugaring in V8

    This is a backport of https://codereview.chromium.org/2672313003/. The
    patch did not land in V8 because it was superseded by another one but it
    is much easier to backport to V8 5.5, was reviewed and passed tests.
    
    Original commit message:
    
        [async await] Fix async function desugaring
    
        Previously we rewrote the return statement in an async function from
        `return expr;` to `return %ResolvePromise(.promise, expr),
        .promise`. This can lead to incorrect behavior in the presence of try-finally.
    
        This patch stores the `expr` of the return statement in a temporary
        variable, resolves and returns the promise at the end of the finally
        block.
    
        BUG=v8:5896
    
    PR-URL: nodejs#12004
    Fixes: nodejs#11960
    Reviewed-By: James M Snell <jasnell@gmail.com>
    Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
    targos committed Mar 27, 2017
    Configuration menu
    Copy the full SHA
    d22346d View commit details
    Browse the repository at this point in the history