Unverified Commit 3a648b7e authored by Michaël Zasso's avatar Michaël Zasso Committed by Myles Borins
Browse files

deps: cherry-pick c3458a8 from upstream V8

Original commit message:

    [parser] Add new FunctionNameInferrer state before parsing param

    Create new state before parsing FormalParameter because we don't
    want to use any of the parameters as an inferred function name.

    Previously the stacktrace was:
      test.js:3: Error: boom
          throw new Error('boom');
          ^
      Error: boom
          at param (test.js:3:11)
          at test.js:4:5
          at test.js:6:3

    The stacktrace with this patch:
      test.js:3: Error: boom
          throw new Error('boom');
          ^
      Error: boom
          at test.js:3:11
          at test.js:4:5
          at test.js:6:3

    Bug: v8:6822, v8:6513
    Change-Id: Ifbadc660fc4e85248af405acd67c025f11662bd4
    Reviewed-on: https://chromium-review.googlesource.com/742657


Reviewed-by: default avatarAdam Klein <adamk@chromium.org>
    Commit-Queue: Sathya Gunasekaran <gsathya@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#49042}

PR-URL: https://github.com/nodejs/node/pull/18059
Closes: https://github.com/nodejs/node/issues/15386
Fixes: https://github.com/nodejs/node/issues/15386
Refs: https://github.com/v8/v8/commit/c3458a86722d735ef4c4e31f9bcaa966e5093e47


Reviewed-By: default avatarBen Noordhuis <info@bnoordhuis.nl>
Reviewed-By: default avatarColin Ihrig <cjihrig@gmail.com>
Reviewed-By: default avatarMichael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: default avatarFranziska Hinkelmann <franziska.hinkelmann@gmail.com>
parent 4746bbf1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment